From 11178eacc797a558b95151d13ef9cf07aefa64f2 Mon Sep 17 00:00:00 2001 From: Stanislav Alekseev <43210583+WeetHet@users.noreply.github.com> Date: Sat, 13 Jul 2024 00:14:11 +0300 Subject: [PATCH] Fix diagnostic popover not overflowing when necessary (#14322) It was broken after #13996 moved rendering text one level deeper, causing `max_h` and `overflow_y_scroll` to apply to different widgets Release Notes: - Fixed large diagnostic popovers not overflowing when nessesary Before: Screenshot 2024-07-12 at 15 25 46 After: Screenshot 2024-07-12 at 15 26 10 --- crates/editor/src/hover_popover.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs index 8f179f8fdba30..2c95a764db782 100644 --- a/crates/editor/src/hover_popover.rs +++ b/crates/editor/src/hover_popover.rs @@ -636,8 +636,6 @@ impl DiagnosticPopover { .when(window_is_transparent(cx), |this| { this.bg(gpui::transparent_black()) }) - .max_w(max_size.width) - .max_h(max_size.height) .cursor(CursorStyle::PointingHand) .tooltip(move |cx| Tooltip::for_action("Go To Diagnostic", &crate::GoToDiagnostic, cx)) // Prevent a mouse move on the popover from being propagated to the editor, @@ -651,6 +649,8 @@ impl DiagnosticPopover { div() .id("diagnostic-inner") .overflow_y_scroll() + .max_w(max_size.width) + .max_h(max_size.height) .px_2() .py_1() .bg(diagnostic_colors.background)