From c771ca49e1cead870ef651016006c1d966a6db7d Mon Sep 17 00:00:00 2001 From: Agus Zubiaga Date: Wed, 12 Feb 2025 17:59:11 -0300 Subject: [PATCH] Fix <1px gap between diff popover and accept keybindingg (#24756) Release Notes: - N/A Co-authored-by: Max Brunsfeld Co-authored-by: Danilo Leal Co-authored-by: rtfeldman Co-authored-by: mgsloan --- crates/editor/src/element.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 78f854ea306f674ea7f1adf111233c63d67fde7a..a13278a40131c8ee17c9c5784743b8b6ffa78cc5 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -3830,10 +3830,16 @@ impl EditorElement { .h(line_height + BORDER_WIDTH * px(2.)) .px_1p5() .gap_1() - .shadow_sm() + // Workaround: For some reason, there's a gap if we don't do this + .ml(-BORDER_WIDTH) + .shadow(smallvec![gpui::BoxShadow { + color: gpui::black().opacity(0.05), + offset: point(px(1.), px(1.)), + blur_radius: px(2.), + spread_radius: px(0.), + }]) .bg(Editor::edit_prediction_line_popover_bg_color(cx)) .border(BORDER_WIDTH) - .border_l_0() .border_color(cx.theme().colors().border) .rounded_r_lg() .children(editor.render_edit_prediction_accept_keybind(window, cx)),