Fix spaced rows

This commit is contained in:
2026-07-15 08:52:39 +02:00
parent 88e5d69087
commit c503e8d583
2 changed files with 18 additions and 6 deletions
+6 -1
View File
@@ -7,6 +7,7 @@ pub enum LayoutItem {
Frame { padding: u16, item: Box<LayoutItem> },
Widget(Size),
Spacing(Size),
}
#[derive(Debug, Clone)]
@@ -82,6 +83,10 @@ impl LayoutItem {
Self::Widget(_) => {
full_alloc.widgets.push(*alloc);
}
Self::Spacing(_) => {
full_alloc.frame.push(*alloc);
}
}
}
@@ -89,7 +94,7 @@ impl LayoutItem {
match self {
Self::Rows { unit, .. } => unit,
Self::Columns { unit, .. } => unit,
Self::Widget(unit) => unit,
Self::Widget(unit) | Self::Spacing(unit) => unit,
Self::Frame { item, .. } => item.get_size(),
}
}