Fix layout issues

The issues were likely caused by floating point inaccuracy. I don't have
a minimal working example though.
This commit is contained in:
Joscha 2024-03-09 19:59:38 +01:00
parent 7aa192047b
commit a0c94c1884

View file

@ -140,7 +140,6 @@ impl Drawer {
.node() .node()
.with_border_all(length(1.0)) .with_border_all(length(1.0))
.with_padding_horiz(length(1.0)) .with_padding_horiz(length(1.0))
.with_margin_right(length(4.0))
.with_flex_shrink(0.0) // Avoid wrapping .with_flex_shrink(0.0) // Avoid wrapping
.and_child(username) .and_child(username)
.register(&mut tree)?; .register(&mut tree)?;
@ -178,9 +177,10 @@ impl Drawer {
let root = Node::empty() let root = Node::empty()
.with_size_width(percent(1.0)) .with_size_width(percent(1.0))
.with_padding_vert(length(1.0)) .with_padding_all(length(1.0))
.with_flex_direction(FlexDirection::Row) .with_flex_direction(FlexDirection::Row)
.with_align_items(Some(AlignItems::Start)) .with_align_items(Some(AlignItems::Start))
.with_gap_width(length(2.0))
.and_child(username) .and_child(username)
.and_child(content) .and_child(content)
.register(&mut tree)?; .register(&mut tree)?;