Rename Drawable::boxed to into_element and make containers generic
Multi-element are now generic over any drawable child, which can be converted into an element. Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
4d433663bd
commit
03619dfa55
80 changed files with 1132 additions and 1434 deletions
|
@ -56,9 +56,8 @@ impl View for StatusBar {
|
|||
.aligned()
|
||||
.contained()
|
||||
.with_margin_right(theme.item_spacing)
|
||||
.boxed()
|
||||
}))
|
||||
.boxed(),
|
||||
.into_element(),
|
||||
|
||||
right: Flex::row()
|
||||
.with_children(self.right_items.iter().rev().map(|i| {
|
||||
|
@ -66,15 +65,14 @@ impl View for StatusBar {
|
|||
.aligned()
|
||||
.contained()
|
||||
.with_margin_left(theme.item_spacing)
|
||||
.boxed()
|
||||
}))
|
||||
.boxed(),
|
||||
.into_element(),
|
||||
}
|
||||
.contained()
|
||||
.with_style(theme.container)
|
||||
.constrained()
|
||||
.with_height(theme.height)
|
||||
.boxed()
|
||||
.into_element()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue