From 87e45f43df79d4cb1656b873ee156b76163cad84 Mon Sep 17 00:00:00 2001 From: thameem-abbas Date: Mon, 4 May 2026 09:46:21 -0400 Subject: [PATCH] fix: compact mode toggle updates instantly without restart Toggle label visibility instead of rebuilding panel children. Label always added to panel, just hidden when compact=true. Co-Authored-By: Claude Opus 4.6 (1M context) --- gnome/indicator.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gnome/indicator.js b/gnome/indicator.js index f77d669..9fae16e 100644 --- a/gnome/indicator.js +++ b/gnome/indicator.js @@ -77,9 +77,8 @@ class CodeBurnIndicator extends PanelMenu.Button { }); box.add_child(this._panelIcon); - - if (!this._settings.get_boolean('compact-mode')) - box.add_child(this._panelLabel); + box.add_child(this._panelLabel); + this._panelLabel.visible = !this._settings.get_boolean('compact-mode'); this.add_child(box); } @@ -180,8 +179,8 @@ class CodeBurnIndicator extends PanelMenu.Button { } _rebuildPanelButton() { - this.remove_all_children(); - this._buildPanelButton(); + const compact = this._settings.get_boolean('compact-mode'); + this._panelLabel.visible = !compact; this._updatePanel(this._lastPayload); }