Fix spaced rows
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user