js: Replace child properties
Every since commit aa394754
, StBoxLayout has supported ClutterActor's
expand/align properties in addition to the container-specific child
properties. Given that that's the only container left with a special
child meta, it's time to fully embrace the generic properties (and
eventually remove the child meta).
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/780
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
4338ca5fd9
commit
104071acbd
@ -179,7 +179,9 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
can_focus: true,
|
||||
track_hover: true,
|
||||
accessible_name: accessibleName,
|
||||
x_expand: true,
|
||||
style_class: 'system-menu-action' });
|
||||
icon.set_x_align(Clutter.ActorAlign.CENTER);
|
||||
icon.child = new St.Icon({ icon_name: iconName });
|
||||
return icon;
|
||||
}
|
||||
@ -251,14 +253,14 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
log('Missing required core component Settings, expect trouble…');
|
||||
this._settingsAction = new St.Widget();
|
||||
}
|
||||
item.add(this._settingsAction, { expand: true, x_fill: false });
|
||||
item.add_child(this._settingsAction);
|
||||
|
||||
this._orientationLockAction = this._createActionButton('', _("Orientation Lock"));
|
||||
this._orientationLockAction.connect('clicked', () => {
|
||||
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
|
||||
this._systemActions.activateLockOrientation();
|
||||
});
|
||||
item.add(this._orientationLockAction, { expand: true, x_fill: false });
|
||||
item.add_child(this._orientationLockAction);
|
||||
this._systemActions.bind_property('can-lock-orientation',
|
||||
this._orientationLockAction,
|
||||
'visible',
|
||||
@ -273,7 +275,7 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
|
||||
this._systemActions.activateLockScreen();
|
||||
});
|
||||
item.add(this._lockScreenAction, { expand: true, x_fill: false });
|
||||
item.add_child(this._lockScreenAction);
|
||||
this._systemActions.bind_property('can-lock-screen',
|
||||
this._lockScreenAction,
|
||||
'visible',
|
||||
@ -300,7 +302,7 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
bindFlags);
|
||||
|
||||
this._altSwitcher = new AltSwitcher(this._powerOffAction, this._suspendAction);
|
||||
item.add(this._altSwitcher, { expand: true, x_fill: false });
|
||||
item.add_child(this._altSwitcher);
|
||||
|
||||
this.menu.addMenuItem(item);
|
||||
|
||||
|
Reference in New Issue
Block a user