From 013569ea8bc88b11b3f83afb666199efdb589382 Mon Sep 17 00:00:00 2001 From: SuperDooper <37051355+superdooper86@users.noreply.github.com> Date: Fri, 8 May 2026 22:17:32 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20gauge=20=E2=80=94=20remove=20'used'=20la?= =?UTF-8?q?bel,=20increase=20pct=20font=20to=2018?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- windows/Controls/GaugeControl.cs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/windows/Controls/GaugeControl.cs b/windows/Controls/GaugeControl.cs index af180db..0b6a7af 100644 --- a/windows/Controls/GaugeControl.cs +++ b/windows/Controls/GaugeControl.cs @@ -46,29 +46,16 @@ public class GaugeControl : FrameworkElement DrawArc(dc, cx, cy, radius, StartAngleDeg, SweepDeg * (Percent / 100.0), new Pen(Accent, StrokeWidth)); - var dpi = VisualTreeHelper.GetDpi(this).PixelsPerDip; - + var dpi = VisualTreeHelper.GetDpi(this).PixelsPerDip; var textColor = ThemeManager.IsDark ? Color.FromRgb(0xF5, 0xF5, 0xF5) : Color.FromRgb(0x1C, 0x1C, 0x1C); - var subColor = Color.FromRgb(0x9E, 0x9E, 0x9E); var pctText = new FormattedText( $"{(int)Math.Round(Percent)}%", CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface(new FontFamily("Segoe UI"), FontStyles.Normal, FontWeights.Bold, FontStretches.Normal), - 14, new SolidColorBrush(textColor), dpi); - var sub = new FormattedText( - "used", - CultureInfo.CurrentCulture, FlowDirection.LeftToRight, - new Typeface("Segoe UI"), 8, - new SolidColorBrush(subColor), dpi) - { - TextAlignment = TextAlignment.Center - }; + 18, new SolidColorBrush(textColor), dpi); - var totalHeight = pctText.Height + 2 + sub.Height; - var startY = cy - totalHeight / 2; - dc.DrawText(pctText, new Point(cx - pctText.Width / 2, startY)); - dc.DrawText(sub, new Point(cx - sub.Width / 2, startY + pctText.Height + 2)); + dc.DrawText(pctText, new Point(cx - pctText.Width / 2, cy - pctText.Height / 2)); } private static void DrawArc(DrawingContext dc, double cx, double cy, double r,