Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

project panel: Use theme token for focused border color (#21593)

Danilo Leal0511768b2260
diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs
index d263c75ca7c..ca6f89f69a0 100644
--- a/crates/project_panel/src/project_panel.rs
+++ b/crates/project_panel/src/project_panel.rs
@@ -261,6 +261,7 @@ struct ItemColors {
hover: Hsla,
drag_over: Hsla,
marked_active: Hsla,
+ focused: Hsla,
}
fn get_item_color(cx: &ViewContext<ProjectPanel>) -> ItemColors {
@@ -271,6 +272,7 @@ fn get_item_color(cx: &ViewContext<ProjectPanel>) -> ItemColors {
hover: colors.ghost_element_hover,
drag_over: colors.drop_target_background,
marked_active: colors.ghost_element_selected,
+ focused: colors.panel_focused_border,
}
}
@@ -3504,7 +3506,7 @@ impl ProjectPanel {
.rounded_none()
.when(
!self.mouse_down && is_active && self.focus_handle.contains_focused(cx),
- |this| this.border_color(Color::Selected.color(cx)),
+ |this| this.border_color(item_colors.focused),
)
}
diff --git a/crates/theme/src/default_colors.rs b/crates/theme/src/default_colors.rs
index 05dd6cd1e74..b9780a304ad 100644
--- a/crates/theme/src/default_colors.rs
+++ b/crates/theme/src/default_colors.rs
@@ -58,7 +58,7 @@ impl ThemeColors {
tab_active_background: neutral().light().step_1(),
search_match_background: neutral().light().step_5(),
panel_background: neutral().light().step_2(),
- panel_focused_border: blue().light().step_5(),
+ panel_focused_border: blue().light().step_10(),
panel_indent_guide: neutral().light_alpha().step_5(),
panel_indent_guide_hover: neutral().light_alpha().step_6(),
panel_indent_guide_active: neutral().light_alpha().step_6(),
@@ -164,7 +164,7 @@ impl ThemeColors {
tab_active_background: neutral().dark().step_1(),
search_match_background: neutral().dark().step_5(),
panel_background: neutral().dark().step_2(),
- panel_focused_border: blue().dark().step_5(),
+ panel_focused_border: blue().dark().step_12(),
panel_indent_guide: neutral().dark_alpha().step_4(),
panel_indent_guide_hover: neutral().dark_alpha().step_6(),
panel_indent_guide_active: neutral().dark_alpha().step_6(),