Stop the top bar dot from breaking the top bar
Release / release (push) Successful in 12s

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 <noreply@anthropic.com>
This commit is contained in:
2026-11-28 14:07:08 -07:00
co-authored by Claude Opus 5.5
parent 9a9c2d7955
commit 3620d6f54c
2 changed files with 7 additions and 2 deletions
+7 -1
View File
@@ -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);
@@ -3,7 +3,6 @@
width: 7px;
height: 7px;
border-radius: 4px;
margin: -1px -3px 0 0;
background-color: -st-accent-color;
}
.coredesktop-badge.warning {