mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-23 23:09:42 +00:00
Prevent breadcrumbs from overflowing the toolbar (#4177)
This PR prevents the breadcrumbs from overflowing the toolbar when its contents are long: <img width="1270" alt="Screenshot 2024-01-19 at 6 15 58 PM" src="https://github.com/zed-industries/zed/assets/1486634/ecee7a42-51ef-43d4-99a1-9c3da784dede"> Release Notes: - Fixed an issue where long breadcrumbs would overflow the toolbar.
This commit is contained in:
parent
107b801a7f
commit
24de848fdf
1 changed files with 6 additions and 2 deletions
|
@ -112,18 +112,22 @@ impl Render for Toolbar {
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.justify_between()
|
.justify_between()
|
||||||
|
.gap_2()
|
||||||
.when(has_left_items, |this| {
|
.when(has_left_items, |this| {
|
||||||
this.child(
|
this.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.flex_1()
|
.flex_auto()
|
||||||
.justify_start()
|
.justify_start()
|
||||||
|
.overflow_x_hidden()
|
||||||
.children(self.left_items().map(|item| item.to_any())),
|
.children(self.left_items().map(|item| item.to_any())),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.when(has_right_items, |this| {
|
.when(has_right_items, |this| {
|
||||||
this.child(
|
this.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.flex_1()
|
// We're using `flex_none` here to prevent some flickering that can occur when the
|
||||||
|
// size of the left items container changes.
|
||||||
|
.flex_none()
|
||||||
.justify_end()
|
.justify_end()
|
||||||
.children(self.right_items().map(|item| item.to_any())),
|
.children(self.right_items().map(|item| item.to_any())),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue