From b1a61ca21e9fd4b2b615f9c61012d54b9895832b Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 15 Dec 2023 14:44:29 -0500 Subject: [PATCH] Fix toolbar width (#3681) This PR fixes an issue with the toolbar width introduced in #3666. The lack of a flex container was making the toolbar contents not take up the full width, and thus not positions items correctly along its main axis. Release Notes: - N/A --- crates/workspace2/src/pane.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/crates/workspace2/src/pane.rs b/crates/workspace2/src/pane.rs index 11588212ef76e3891c57fc5a14778fd8e48a9e37..65e7f2a1063add17b8321f6594746871af418bdc 100644 --- a/crates/workspace2/src/pane.rs +++ b/crates/workspace2/src/pane.rs @@ -1897,19 +1897,14 @@ impl Render for Pane { .on_drag_move::(cx.listener(Self::handle_drag_move)) .map(|div| { if let Some(item) = self.active_item() { - div.flex_col() + div.v_flex() .child(self.toolbar.clone()) .child(item.to_any()) } else { - div.flex() - .flex_row() - .items_center() - .size_full() - .justify_center() - .child( - Label::new("Open a file or project to get started.") - .color(Color::Muted), - ) + div.h_flex().size_full().justify_center().child( + Label::new("Open a file or project to get started.") + .color(Color::Muted), + ) } }) .child(