From 53b76e3e4d0946128b271875358efd974e0716de Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 19 Dec 2023 18:06:21 -0500 Subject: [PATCH] Style pane drop targets (#3726) This PR styles the pane drop targets using the `drop_target_background` color from the theme. We do have to adjust the alpha channel of the color so that it doesn't obscure the contents of the buffer. Release Notes: - N/A --- crates/workspace2/src/pane.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/workspace2/src/pane.rs b/crates/workspace2/src/pane.rs index 6b498124e371b67eaa5bd64ac26b5e95d3f4929d..4d0d4653090ad4ba0e993f21d67d1b6cceaa7553 100644 --- a/crates/workspace2/src/pane.rs +++ b/crates/workspace2/src/pane.rs @@ -1817,9 +1817,6 @@ impl Render for Pane { type Element = Focusable
; fn render(&mut self, cx: &mut ViewContext) -> Self::Element { - let mut drag_target_color = cx.theme().colors().text; - drag_target_color.a = 0.5; - v_stack() .key_context("Pane") .track_focus(&self.focus_handle) @@ -1922,7 +1919,10 @@ impl Render for Pane { div() .invisible() .absolute() - .bg(drag_target_color) + .bg(theme::color_alpha( + cx.theme().colors().drop_target_background, + 0.75, + )) .group_drag_over::("", |style| style.visible()) .group_drag_over::("", |style| style.visible()) .on_drop(cx.listener(move |this, dragged_tab, cx| {