From 086c767ed66b6df73d33d9ce159a4b20b8194c80 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Sat, 27 Aug 2022 11:03:12 +0300 Subject: [PATCH] pad string to a fixed length to stop shifting --- src/components/widgets/resources/cpu.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/widgets/resources/cpu.jsx b/src/components/widgets/resources/cpu.jsx index 36bda7435..541f1a421 100644 --- a/src/components/widgets/resources/cpu.jsx +++ b/src/components/widgets/resources/cpu.jsx @@ -35,9 +35,11 @@ export default function Cpu() {
- {Math.round(data.cpu.usage)}% Usage - {(Math.round(data.cpu.load * 100) / 100).toFixed(1)} Load + {`${Math.round(data.cpu.usage)}%`.padEnd(3, " ")} Usage + + + {`${(Math.round(data.cpu.load * 100) / 100).toFixed(1)}`.padEnd(3, " ")} Load