demonstrate padding on all 4 sides

This commit is contained in:
griffi-gh 2023-11-28 20:18:47 +01:00
parent 0862ffaf04
commit 769d7e84e9

View file

@ -113,7 +113,12 @@ fn main() {
}), }),
Box::new(Container { Box::new(Container {
background: Some(vec4(1., 0., 0., 1.)), background: Some(vec4(1., 0., 0., 1.)),
padding: Sides::horizontal_vertical(30., 5.), padding: Sides {
top: 10.,
bottom: 20.,
left: 30.,
right: 40.,
},
elements: vec![ elements: vec![
Box::new(Rect { Box::new(Rect {
size: (UiSize::Pixels(50.), UiSize::Pixels(50.)), size: (UiSize::Pixels(50.), UiSize::Pixels(50.)),