From 3620d6f54c97340be1bf1e7247d87a36a2610e4a Mon Sep 17 00:00:00 2001 From: David Young Date: Sat, 28 Nov 2026 14:07:08 -0700 Subject: [PATCH] Stop the top bar dot from breaking the top bar The dot was nudged past the icon's corner with a negative margin, which Clutter turns into a preferred width of 2^32. Showing it squeezed the button to nothing and broke the whole top bar's drawing. Siblings made this happen at every login, since a newer sibling shows the dot. Nudge it with a translation instead, which leaves the layout alone. Co-Authored-By: Claude Opus 5.5 --- coredesktop@federated.computer/extension.js | 8 +++++++- coredesktop@federated.computer/stylesheet.css | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/coredesktop@federated.computer/extension.js b/coredesktop@federated.computer/extension.js index 20bb03b..e64044b 100644 --- a/coredesktop@federated.computer/extension.js +++ b/coredesktop@federated.computer/extension.js @@ -212,17 +212,23 @@ class Indicator extends PanelMenu.Button { // Top bar: the logo, with a dot in its corner when something needs attention _buildPanelIcon() { // The dot overlaps the icon's top right corner: both sit in a bin the - // icon's size, the dot aligned to its corner + // icon's size, the dot aligned to its corner and nudged past it. The + // nudge is a translation, not a negative margin: Clutter turns a + // negative margin into a width of 2^32, squeezing the button to nothing + // and breaking the whole top bar's drawing. const box = new St.Widget({ layout_manager: new Clutter.BinLayout(), x_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.CENTER, }); this._panelIcon = new St.Icon({gicon: this._gicon, style_class: 'system-status-icon'}); + const scale = St.ThemeContext.get_for_stage(global.stage).scale_factor; this._badge = new St.Widget({ style_class: 'coredesktop-badge', x_align: Clutter.ActorAlign.END, y_align: Clutter.ActorAlign.START, + translation_x: 3 * scale, + translation_y: -1 * scale, visible: false, }); box.add_child(this._panelIcon); diff --git a/coredesktop@federated.computer/stylesheet.css b/coredesktop@federated.computer/stylesheet.css index 89ec7a0..0ebc6fb 100644 --- a/coredesktop@federated.computer/stylesheet.css +++ b/coredesktop@federated.computer/stylesheet.css @@ -3,7 +3,6 @@ width: 7px; height: 7px; border-radius: 4px; - margin: -1px -3px 0 0; background-color: -st-accent-color; } .coredesktop-badge.warning {