Fix toolbar flex sizing
This commit is contained in:
parent
ed098c834e
commit
2484a6969a
1 changed files with 16 additions and 2 deletions
|
@ -109,8 +109,22 @@ impl Render for Toolbar {
|
||||||
.child(
|
.child(
|
||||||
h_stack()
|
h_stack()
|
||||||
.justify_between()
|
.justify_between()
|
||||||
.child(h_stack().children(self.left_items().map(|item| item.to_any())))
|
.when(self.left_items().count() > 0, |this| {
|
||||||
.child(h_stack().children(self.right_items().map(|item| item.to_any()))),
|
this.child(
|
||||||
|
h_stack()
|
||||||
|
.flex_1()
|
||||||
|
.justify_start()
|
||||||
|
.children(self.left_items().map(|item| item.to_any())),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
.when(self.right_items().count() > 0, |this| {
|
||||||
|
this.child(
|
||||||
|
h_stack()
|
||||||
|
.flex_1()
|
||||||
|
.justify_end()
|
||||||
|
.children(self.right_items().map(|item| item.to_any())),
|
||||||
|
)
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
.children(secondary_item)
|
.children(secondary_item)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue