From 54e45306c59d33d44e045bbf44d9c42d9427a2df Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 22 Dec 2023 18:00:03 +0100 Subject: [PATCH] Fix resizing for bottom dock We were not using `flex` on the `PaneGroup`, which caused the bottom dock to be unable to satisfy the desired resize value. --- crates/workspace2/src/pane_group.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/workspace2/src/pane_group.rs b/crates/workspace2/src/pane_group.rs index 06bd506e56e68b0a6932c18f3cb1ee190f45ab40..800d03a50cbc718d13566a3270ac317c28e105a5 100644 --- a/crates/workspace2/src/pane_group.rs +++ b/crates/workspace2/src/pane_group.rs @@ -242,6 +242,7 @@ impl Member { div() .relative() + .flex_1() .size_full() .child(pane.clone()) .when_some(leader_border, |this, color| { @@ -778,6 +779,9 @@ mod element { cx: &mut ui::prelude::WindowContext, ) -> (gpui::LayoutId, Self::State) { let mut style = Style::default(); + style.flex_grow = 1.; + style.flex_shrink = 1.; + style.flex_basis = relative(0.).into(); style.size.width = relative(1.).into(); style.size.height = relative(1.).into(); let layout_id = cx.request_layout(&style, None);