tab_switcher: Use git-aware colors for file icons (#18733)

Release Notes:

- Fixed tab switcher icons not respecting the `tabs.git_status` setting.

Fixes an issue mentioned in
https://github.com/zed-industries/zed/pull/17115#issuecomment-2378966170
- file icons in the tab switcher weren't colored according to git
status, even if `tabs.git_status` was set to true.

I used a similar approach I saw in other places of the project to get
the project entry and its git status, but maybe we could move the
coloring logic entirely to `tab_icon()`? Wouldn't this break anything?

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
Daste 2024-10-04 16:37:41 +02:00 committed by GitHub
parent 9702310737
commit d695de4504
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 39 additions and 8 deletions

1
Cargo.lock generated
View file

@ -11412,6 +11412,7 @@ dependencies = [
"project",
"serde",
"serde_json",
"settings",
"theme",
"ui",
"util",