From bc9a3e53af44040fa4c44255527be53aa693645e Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 12 Mar 2026 13:07:39 -0600 Subject: [PATCH] Tidy up DiffStat (#51411) Release Notes: - Tweaked the git diff status to render + and - using the font instead of icons. --- crates/ui/src/components/diff_stat.rs | 30 ++++++--------------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/crates/ui/src/components/diff_stat.rs b/crates/ui/src/components/diff_stat.rs index ec6d515f1b4f847631fc65fae4ed3ccd3185d271..45539c62869b8c23cb76671d2a7a862c9592a181 100644 --- a/crates/ui/src/components/diff_stat.rs +++ b/crates/ui/src/components/diff_stat.rs @@ -30,32 +30,14 @@ impl RenderOnce for DiffStat { .id(self.id) .gap_1() .child( - h_flex() - .gap_0p5() - .child( - Icon::new(IconName::Plus) - .size(IconSize::XSmall) - .color(Color::Success), - ) - .child( - Label::new(self.added.to_string()) - .color(Color::Success) - .size(self.label_size), - ), + Label::new(format!("+\u{2009}{}", self.added)) + .color(Color::Success) + .size(self.label_size), ) .child( - h_flex() - .gap_0p5() - .child( - Icon::new(IconName::Dash) - .size(IconSize::XSmall) - .color(Color::Error), - ) - .child( - Label::new(self.removed.to_string()) - .color(Color::Error) - .size(self.label_size), - ), + Label::new(format!("\u{2012}\u{2009}{}", self.removed)) + .color(Color::Error) + .size(self.label_size), ) } }