Use flex_1 div instead of justify_center in toolbar
This commit is contained in:
parent
98f5a3d544
commit
c9893ce2fd
1 changed files with 5 additions and 1 deletions
|
@ -108,7 +108,6 @@ impl Render for Toolbar {
|
||||||
.bg(cx.theme().colors().toolbar_background)
|
.bg(cx.theme().colors().toolbar_background)
|
||||||
.child(
|
.child(
|
||||||
h_stack()
|
h_stack()
|
||||||
.justify_between()
|
|
||||||
.when(self.left_items().count() > 0, |this| {
|
.when(self.left_items().count() > 0, |this| {
|
||||||
this.child(
|
this.child(
|
||||||
h_stack()
|
h_stack()
|
||||||
|
@ -117,6 +116,11 @@ impl Render for Toolbar {
|
||||||
.children(self.left_items().map(|item| item.to_any())),
|
.children(self.left_items().map(|item| item.to_any())),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
// Render an empty div that takes up the space between
|
||||||
|
// the left and right sides. This won't cause items to
|
||||||
|
// be centered like justify_center() will if left or
|
||||||
|
// right is missing.
|
||||||
|
.child(div().flex_1())
|
||||||
.when(self.right_items().count() > 0, |this| {
|
.when(self.right_items().count() > 0, |this| {
|
||||||
this.child(
|
this.child(
|
||||||
h_stack()
|
h_stack()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue