From 0ba87c37ecd80ff01d25dfad642656b045cc7811 Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Wed, 26 Aug 2026 15:42:31 +0200 Subject: [PATCH] Widen the speed value pill for decimal rates Use a fixed ten-character value module with compact seven-pixel padding so 300.5 MB/s has balanced breathing room without affecting the graph position. --- src/renderer/styles.css | 6 +++--- tests/statistics-view.test.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/styles.css b/src/renderer/styles.css index c5d2d82..aafae2c 100644 --- a/src/renderer/styles.css +++ b/src/renderer/styles.css @@ -643,9 +643,9 @@ body, display: flex; align-items: center; justify-content: flex-end; - flex: 0 0 9ch; - width: 9ch; - min-width: 9ch; + flex: 0 0 10ch; + width: 10ch; + min-width: 10ch; padding: 0 7px; font-size: 12px; font-weight: 600; diff --git a/tests/statistics-view.test.tsx b/tests/statistics-view.test.tsx index ea83898..fdd14b7 100644 --- a/tests/statistics-view.test.tsx +++ b/tests/statistics-view.test.tsx @@ -598,7 +598,7 @@ describe("bandwidth chart palette", () => { const source = readFileSync(new URL("../src/renderer/App.tsx", import.meta.url), "utf8"); expect(css).toMatch(/\.speed-sparkline-canvas\s*\{[^}]*width:\s*150px;/s); - expect(css).toMatch(/\.speed-sparkline-value\s*\{[^}]*flex:\s*0 0 9ch;[^}]*width:\s*9ch;[^}]*min-width:\s*9ch;[^}]*padding:\s*0 7px;/s); + expect(css).toMatch(/\.speed-sparkline-value\s*\{[^}]*flex:\s*0 0 10ch;[^}]*width:\s*10ch;[^}]*min-width:\s*10ch;[^}]*padding:\s*0 7px;/s); expect(source).toContain('className="speed-sparkline-graph"'); expect(css).toMatch(/\.speed-sparkline-graph,\s*\.speed-sparkline-value\s*\{[^}]*background:\s*var\(--field\);[^}]*border:\s*1px solid var\(--border\);[^}]*border-radius:\s*8px;/s); });