Make vertical layout

This commit is contained in:
Michael Mikovsky
2025-11-10 11:39:02 -07:00
parent a38b37878e
commit fe27093288
5 changed files with 169 additions and 93 deletions
+14 -1
View File
@@ -54,7 +54,20 @@ impl View for VerticalLayout {
where
Self: Sized,
{
todo!("");
let mut parsed_children = Vec::new();
for child in children {
let child = child.parse();
if let Ok(b) = child.as_any().downcast::<BoxView>() {
parsed_children.push(*b);
} else {
panic!("Constraint Layout must contain only BoxView!")
}
}
Box::new(Self::new(parsed_children))
// Box::new(Self {
// views: children.iter().map(|tag| tag.parse()).collect(),
// bounds: (None, None),