From f37ad76f3a53f27bda540d93b68c10106ba74109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wr=C3=B3bel?= Date: Mon, 28 Sep 2026 16:44:21 +0200 Subject: [PATCH] Reserve initial space for fixed-width readings At startup, the first readings and later larger values widen labels and shift the readings that follow. Give fixed-width labels a 2em starting width. Remove the placeholder ellipsis so labels stay empty until the values arrive. --- extension.js | 6 ++++-- stylesheet.css | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/extension.js b/extension.js index 598cecac..99db0e99 100644 --- a/extension.js +++ b/extension.js @@ -271,8 +271,10 @@ var VitalsMenuButton = GObject.registerClass({ if (key == '_default_icon_') return; let label = new St.Label({ - style_class: 'vitals-panel-label', - text: (value)?value:'\u2026', // ... + style_class: this._settings.get_boolean('fixed-widths') + ? 'vitals-panel-label vitals-panel-label-fixed' + : 'vitals-panel-label', + text: value ?? '', style: style || null, y_expand: true, y_align: Clutter.ActorAlign.CENTER diff --git a/stylesheet.css b/stylesheet.css index b4f7c0df..86338ee8 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -1,5 +1,6 @@ .vitals-panel-item{spacing: 0;} .vitals-panel-menu{spacing: 11px; padding: 3px; } +.vitals-panel-label-fixed { min-width: 2em; text-align: left; } .vitals-panel-icon { margin: 0; padding: 0; } /* BEGIN measured icon margins */ /* Generated by tools/icon-spacing.py; visible gap: 6px. */