Wrap indicator children in BoxLayout for proper allocation

PanelMenu.ButtonBox.vfunc_allocate only handles its first child via
get_first_child(). Adding icon and label as direct children caused the
label to never be allocated, making the indicator invisible when WiFi
generation is unknown and the label should display instead of the icon.
This commit is contained in:
Jalil Arfaoui 2026-02-18 01:17:53 +01:00
parent 87438d9437
commit bc59c51c9e

View file

@ -142,8 +142,10 @@ export default class WifiSignalPlusExtension extends Extension {
style_class: 'wifi-signal-plus-label',
});
this.indicator.add_child(this.icon);
this.indicator.add_child(this.label);
const box = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
box.add_child(this.icon);
box.add_child(this.label);
this.indicator.add_child(box);
this.buildMenu();
Main.panel.addToStatusArea(this.uuid, this.indicator);