aggregateMenu: Include action buttons in width computation again

Commit 1b169655ac removed the system indicator from the list of children
that are considered for the overall menu width, because we do want the
log-out submenu to adapt to the available width.

However as a side effect, action buttons no longer contribute to the
width either, so if extensions add additional buttons, the menu is
likely to overflow.

Avoid this by only adding the button group to the list of size children.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1094
This commit is contained in:
Florian Müllner 2019-03-20 12:48:21 +00:00 committed by Georges Basile Stavracas Neto
parent 05e55cee23
commit 0089143d06
2 changed files with 2 additions and 0 deletions

View File

@ -809,6 +809,7 @@ class AggregateMenu extends PanelMenu.Button {
menuLayout.addSizeChild(this._location.menu.actor); menuLayout.addSizeChild(this._location.menu.actor);
menuLayout.addSizeChild(this._rfkill.menu.actor); menuLayout.addSizeChild(this._rfkill.menu.actor);
menuLayout.addSizeChild(this._power.menu.actor); menuLayout.addSizeChild(this._power.menu.actor);
menuLayout.addSizeChild(this._system.buttonGroup);
} }
}); });

View File

@ -236,6 +236,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
item = new PopupMenu.PopupBaseMenuItem({ reactive: false, item = new PopupMenu.PopupBaseMenuItem({ reactive: false,
can_focus: false }); can_focus: false });
this.buttonGroup = item.actor;
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app( let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
'gnome-control-center.desktop' 'gnome-control-center.desktop'