fix align_test example

This commit is contained in:
griffi-gh 2024-03-02 01:09:57 +01:00
parent 9f0809c61c
commit 7cd716b905

View file

@ -43,7 +43,7 @@ fn main() {
hui.add(Container { hui.add(Container {
gap: 5., gap: 5.,
padding: Sides::all(5.), padding: Sides::all(5.),
align: (Alignment::Begin, Alignment::Center).into(), align: (Alignment::Center, Alignment::Begin).into(),
size: (Size::Fraction(1.), Size::Fraction(1.)).into(), size: (Size::Fraction(1.), Size::Fraction(1.)).into(),
children: ElementList(vec![ children: ElementList(vec![
Box::new(ProgressBar { Box::new(ProgressBar {
@ -57,7 +57,7 @@ fn main() {
hui.add(Container { hui.add(Container {
gap: 5., gap: 5.,
padding: Sides::all(5.), padding: Sides::all(5.),
align: (Alignment::End, Alignment::Center).into(), align: (Alignment::Center, Alignment::End).into(),
size: (Size::Fraction(1.), Size::Fraction(1.)).into(), size: (Size::Fraction(1.), Size::Fraction(1.)).into(),
children: ElementList(vec![ children: ElementList(vec![
Box::new(ProgressBar { Box::new(ProgressBar {
@ -67,7 +67,7 @@ fn main() {
}), }),
Box::new(Container { Box::new(Container {
size: (Size::Fraction(1.), Size::Auto).into(), size: (Size::Fraction(1.), Size::Auto).into(),
align: (Alignment::Center, Alignment::End).into(), align: (Alignment::End, Alignment::Center).into(),
padding: Sides::all(5.), padding: Sides::all(5.),
gap: 10., gap: 10.,
children: ElementList(vec![ children: ElementList(vec![