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:
parent
87438d9437
commit
bc59c51c9e
1 changed files with 4 additions and 2 deletions
|
|
@ -142,8 +142,10 @@ export default class WifiSignalPlusExtension extends Extension {
|
||||||
style_class: 'wifi-signal-plus-label',
|
style_class: 'wifi-signal-plus-label',
|
||||||
});
|
});
|
||||||
|
|
||||||
this.indicator.add_child(this.icon);
|
const box = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
this.indicator.add_child(this.label);
|
box.add_child(this.icon);
|
||||||
|
box.add_child(this.label);
|
||||||
|
this.indicator.add_child(box);
|
||||||
this.buildMenu();
|
this.buildMenu();
|
||||||
|
|
||||||
Main.panel.addToStatusArea(this.uuid, this.indicator);
|
Main.panel.addToStatusArea(this.uuid, this.indicator);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue