From d3dfa91254f8cbc7f4779463b30a3df1677c395d Mon Sep 17 00:00:00 2001 From: loczek <30776250+loczek@users.noreply.github.com> Date: Wed, 15 May 2024 17:08:24 +0200 Subject: [PATCH] Fix aside affecting parent popover height (#11859) Release Notes: - Fixed the size of the completions menu changing based on the size of the aside ([#11722](https://github.com/zed-industries/zed/issues/11722)). https://github.com/zed-industries/zed/assets/30776250/c67e6fef-20f2-4dc5-92b3-09bb73f874a7 https://github.com/zed-industries/zed/assets/30776250/7467b8ee-6e66-42d7-a8cc-2df11df58c5e --------- Co-authored-by: Marshall Bowers --- crates/ui/src/components/popover.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/ui/src/components/popover.rs b/crates/ui/src/components/popover.rs index b9932eb401a85d8d15010a65d4dacef7fd1f27e8..d71b9028d0fff67f2c84b25c3313e9abd8d0e5ed 100644 --- a/crates/ui/src/components/popover.rs +++ b/crates/ui/src/components/popover.rs @@ -40,10 +40,14 @@ pub struct Popover { impl RenderOnce for Popover { fn render(self, cx: &mut WindowContext) -> impl IntoElement { - div() - .flex() + h_flex() + .items_start() .gap_1() - .child(v_flex().elevation_2(cx).px_1().children(self.children)) + .child( + div() + .flex() + .child(v_flex().elevation_2(cx).px_1().children(self.children)), + ) .when_some(self.aside, |this, aside| { this.child( v_flex()