From 547ad77243709f3c9e10c4dfb23da781b9565dab Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 19 Dec 2023 17:45:42 -0500 Subject: [PATCH] Style tab drop targets for project entries (#3725) This PR styles the drop targets when dragging a project entry onto a tab or the tab bar. I also adjusted the existing tab drop targets to use the `drop_target_background` from the theme. Release Notes: - N/A --- crates/workspace2/src/pane.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/workspace2/src/pane.rs b/crates/workspace2/src/pane.rs index e1bb006c11428149d5ade09aed2db137e7e61cdb..6b498124e371b67eaa5bd64ac26b5e95d3f4929d 100644 --- a/crates/workspace2/src/pane.rs +++ b/crates/workspace2/src/pane.rs @@ -1511,8 +1511,8 @@ impl Pane { }, |tab, cx| cx.build_view(|_| tab.clone()), ) - .drag_over::(|tab| tab.bg(cx.theme().colors().tab_active_background)) - .drag_over::(|tab| tab.bg(gpui::red())) + .drag_over::(|tab| tab.bg(cx.theme().colors().drop_target_background)) + .drag_over::(|tab| tab.bg(cx.theme().colors().drop_target_background)) .on_drop(cx.listener(move |this, dragged_tab: &DraggedTab, cx| { this.drag_split_direction = None; this.handle_tab_drop(dragged_tab, ix, cx) @@ -1664,9 +1664,11 @@ impl Pane { .h_full() .flex_grow() .drag_over::(|bar| { - bar.bg(cx.theme().colors().tab_active_background) + bar.bg(cx.theme().colors().drop_target_background) + }) + .drag_over::(|bar| { + bar.bg(cx.theme().colors().drop_target_background) }) - .drag_over::(|bar| bar.bg(gpui::red())) .on_drop(cx.listener(move |this, dragged_tab: &DraggedTab, cx| { this.drag_split_direction = None; this.handle_tab_drop(dragged_tab, this.items.len(), cx)