ui: Use VersionControl colors for added and removed diff stats (#64083)
# Objective Fixes #63806 Diff stats use general `success` and `error` colors for added and deleted line counts. ## Solution Using `version_control.added` and `version_control.deleted` instead to match the version control icons color palette. ## Testing - Did you test these changes? If so, how? built and ran locally. - Are there any parts that need more testing? no - How can other people (reviewers) test your changes? Is there anything specific they need to know? no - If relevant, what platforms did you test these changes on, and are there any important ones you can't test? ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase <details> <summary>Click to view showcase</summary> <img width="2394" height="776" alt="zed_diff_stat_colors" src="https://github.com/user-attachments/assets/5c3f89fd-4a07-4fc8-83f9-5f6e133dfe86" /> Left Zed - unchanged Right Zed - fixed </details> --- Release Notes: - Fixed diff statistics to use the theme’s version-control colors for added and deleted line counts.
This commit is contained in:
1 parent
593d6a4d66
commit
280beb8920
1 file changed
+2
-2
@@ -44,12 +44,12 @@ impl RenderOnce for DiffStat {
|
||||
.gap_1()
|
||||
.child(
|
||||
Label::new(format!("+\u{2009}{added}"))
|
||||
.color(Color::Success)
|
||||
.color(Color::VersionControlAdded)
|
||||
.size(self.label_size),
|
||||
)
|
||||
.child(
|
||||
Label::new(format!("\u{2012}\u{2009}{removed}"))
|
||||
.color(Color::Error)
|
||||
.color(Color::VersionControlDeleted)
|
||||
.size(self.label_size),
|
||||
)
|
||||
.when_some(tooltip, |this, tooltip| {
|
||||
|
||||
Reference in new issue
Block a user