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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user