From ce7cd7c163b27210330333ed299cc273cef30c10 Mon Sep 17 00:00:00 2001 From: Valery Borovsky <138976239+Vastargazing@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:51:20 +0300 Subject: [PATCH] git_ui: Hide status icon when status_style is set to label_color (#51947) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Context When `git_panel.status_style` is set to `label_color`, the git panel should indicate file status through text color only, without showing status icons. However, the icons were still being rendered regardless of this setting. The root cause: `git_status_icon(status)` was called unconditionally in `render_status_entry`, with no check against the current `status_style` value. Closes #51714 ## How to Review Single change in `crates/git_ui/src/git_panel.rs` — `render_status_entry` function. The icon render call is now wrapped in `.when(status_style != StatusStyle::LabelColor, ...)`. Release Notes: - Fixed git panel status icons still showing when `git_panel.status_style` is set to `label_color` Bug: image Fix: image --- crates/git_ui/src/git_panel.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index 1fc4813157f8e64a4e51cc570b906b3a2d456002..d8476555f555134a78d06d9d22970fb3a111b2ea 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -5158,7 +5158,9 @@ impl GitPanel { }), ) }) - .child(git_status_icon(status)) + .when(status_style != StatusStyle::LabelColor, |el| { + el.child(git_status_icon(status)) + }) .map(|this| { if tree_view { this.pl(px(depth as f32 * TREE_INDENT)).child(