From f24086ecf8df5c4291e2f32375d7f98558b33242 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Fri, 21 Mar 2025 14:49:52 -0400 Subject: [PATCH] editor: Fix regression in git label colors due to status color changes (#27272) This PR fixes the new awkward-looking git status labels due to the change in version control colors. We want to enable styling version control colors distinctly from other statuses, but these colors aren't great for labels as they are meant to be quite high contrast. We may need to split version control colors into a primary color and a text color if we want to improve theming this overall. | Before | After | |--------|-------| | ![CleanShot 2025-03-21 at 14 12 22@2x](https://github.com/user-attachments/assets/fadb93b1-06b6-44cc-bf16-7e1279166ed0) | ![CleanShot 2025-03-21 at 14 12 49@2x](https://github.com/user-attachments/assets/262ffc23-60b9-4cee-8a2b-9e864130912f) | Release Notes: - Fixes a regression in git status colors in the project panel --- crates/editor/src/items.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/editor/src/items.rs b/crates/editor/src/items.rs index 39c041892fa66dbfff0f639100c3ba805acbd78d..200556b85e959758713f350e6cdae6a9c5cea8ab 100644 --- a/crates/editor/src/items.rs +++ b/crates/editor/src/items.rs @@ -1673,13 +1673,13 @@ pub fn entry_diagnostic_aware_icon_decoration_and_color( pub fn entry_git_aware_label_color(git_status: GitSummary, ignored: bool, selected: bool) -> Color { let tracked = git_status.index + git_status.worktree; if ignored { - Color::VersionControlIgnored + Color::Ignored } else if git_status.conflict > 0 { - Color::VersionControlConflict + Color::Conflict } else if tracked.modified > 0 { - Color::VersionControlModified + Color::Modified } else if tracked.added > 0 || git_status.untracked > 0 { - Color::VersionControlAdded + Color::Created } else { entry_label_color(selected) }