# git_ui: Hide status icon when status_style is set to label_color \(\#51947\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ce7cd7c163b27210330333ed299cc273cef30c10)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ce7cd7c163b27210330333ed299cc273cef30c10

Requested commit: ce7cd7c163b27210330333ed299cc273cef30c10

Commit: ce7cd7c163b27210330333ed299cc273cef30c10

Tree: 993fe18e0370ec26e254cb51c8f3cfbe7a5e782f

Author: Valery Borovsky

Committer: GitHub

## Message

```
git_ui: Hide status icon when status_style is set to label_color (#51947)

## 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:
<img width="2559" height="1357" alt="image"
src="https://github.com/user-attachments/assets/3cad9f96-8b5c-4554-8b9f-f931026bdfe1"
/>

Fix:
<img width="1512" height="801" alt="image"
src="https://github.com/user-attachments/assets/99f36d11-a8b2-412a-ab73-18200f6594d2"
/>
```

## Parents

- [b28990e4719a46b4f0fd97590a2e8ca9acef4a5d](https://git.cafe/gitcafe/zed/commit/b28990e4719a46b4f0fd97590a2e8ca9acef4a5d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ce7cd7c163b27210330333ed299cc273cef30c10?format=markdown)
