From 280beb8920cedb334cfb2de63dad1bccf0450cc3 Mon Sep 17 00:00:00 2001 From: kvechkanov Date: Tue, 15 Sep 2026 12:11:12 +0000 Subject: [PATCH] ui: Use VersionControl colors for added and removed diff stats (#64083) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 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
Click to view showcase zed_diff_stat_colors Left Zed - unchanged Right Zed - fixed
--- Release Notes: - Fixed diff statistics to use the theme’s version-control colors for added and deleted line counts. --- crates/ui/src/components/diff_stat.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui/src/components/diff_stat.rs b/crates/ui/src/components/diff_stat.rs index d6d644db43..bacadaa078 100644 --- a/crates/ui/src/components/diff_stat.rs +++ b/crates/ui/src/components/diff_stat.rs @@ -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| {