Refactor Git panel styling & status colors for consistency (#26951)

Closes #26847

Release Notes:

- Updated Git panel background to use panel_background instead of
ElevationIndex::Surface.bg(cx) for consistency with other panels.
- Removed redundant GitStatusColors struct from status.rs and refactored
to use existing theme colors.
- Adjusted Color enum mappings in color.rs to reference
version_control_* colors instead of status() for better alignment with
the theme system.
- Cleaned up unused or redundant code.
This commit is contained in:
Jakub Čermák 2025-03-19 15:26:36 +01:00 committed by GitHub
parent 2230f3b09d
commit 584a70ca5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 28 deletions

View file

@ -3532,14 +3532,14 @@ impl GitPanel {
let label_color = if status_style == StatusStyle::LabelColor {
if has_conflict {
Color::Conflict
Color::VersionControlConflict
} else if is_modified {
Color::Modified
Color::VersionControlModified
} else if is_deleted {
// We don't want a bunch of red labels in the list
Color::Disabled
} else {
Color::Created
Color::VersionControlAdded
}
} else {
Color::Default
@ -3808,7 +3808,7 @@ impl Render for GitPanel {
}))
.size_full()
.overflow_hidden()
.bg(ElevationIndex::Surface.bg(cx))
.bg(cx.theme().colors().panel_background)
.child(
v_flex()
.size_full()