From 24de848fdf2a32f14dbd36364d9901156b27f3d9 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 19 Jan 2024 18:23:14 -0500 Subject: [PATCH] Prevent breadcrumbs from overflowing the toolbar (#4177) This PR prevents the breadcrumbs from overflowing the toolbar when its contents are long: Screenshot 2024-01-19 at 6 15 58 PM Release Notes: - Fixed an issue where long breadcrumbs would overflow the toolbar. --- crates/workspace/src/toolbar.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/workspace/src/toolbar.rs b/crates/workspace/src/toolbar.rs index 3d5df3294e..b127de8de5 100644 --- a/crates/workspace/src/toolbar.rs +++ b/crates/workspace/src/toolbar.rs @@ -112,18 +112,22 @@ impl Render for Toolbar { .child( h_flex() .justify_between() + .gap_2() .when(has_left_items, |this| { this.child( h_flex() - .flex_1() + .flex_auto() .justify_start() + .overflow_x_hidden() .children(self.left_items().map(|item| item.to_any())), ) }) .when(has_right_items, |this| { this.child( 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() .children(self.right_items().map(|item| item.to_any())), )