panel: Remove aggregate menu

The menu has served us well over the years, but it is finally time
to retire it.

         τετέλεσται

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2408>
This commit is contained in:
Florian Müllner 2022-08-03 06:11:33 +02:00 committed by Marge Bot
parent 84c33157a2
commit a4134e1559
3 changed files with 3 additions and 69 deletions

View File

@ -164,28 +164,6 @@
-arrow-rise: 0px; // hide the beak on the menu
}
// system status menu
.aggregate-menu {
min-width: 22em;
// this is unneeded at the top-level in this menu, hide it
.popup-menu-ornament { width: 0 !important; }
// lock screen, shutdown, etc. buttons
.popup-menu-icon {
-st-icon-style: symbolic;
&:ltr {margin-right: $base_margin*2;}
&:rtl {margin-left: $base_margin*2;}
}
// account for ornaments in submenus with padding
.popup-sub-menu .popup-menu-item > :first-child {
// this value is hardcoded for visual effect
&:ltr { margin-left: 1em;}
&:rtl { margin-right: 1em;}
}
}
// right-click (and panel) app menu
.app-menu {
max-width: 27.25em;

View File

@ -332,49 +332,6 @@ class UnsafeModeIndicator extends SystemIndicator {
}
});
var AggregateLayout = GObject.registerClass(
class AggregateLayout extends Clutter.BoxLayout {
_init(params = {}) {
params['orientation'] = Clutter.Orientation.VERTICAL;
super._init(params);
this._sizeChildren = [];
}
addSizeChild(actor) {
this._sizeChildren.push(actor);
this.layout_changed();
}
vfunc_get_preferred_width(container, forHeight) {
let themeNode = container.get_theme_node();
let minWidth = themeNode.get_min_width();
let natWidth = minWidth;
for (let i = 0; i < this._sizeChildren.length; i++) {
let child = this._sizeChildren[i];
let [childMin, childNat] = child.get_preferred_width(forHeight);
minWidth = Math.max(minWidth, childMin);
natWidth = Math.max(natWidth, childNat);
}
return [minWidth, natWidth];
}
});
var AggregateMenu = GObject.registerClass(
class AggregateMenu extends PanelMenu.Button {
_init() {
super._init(0.0, C_("System menu in the top bar", "System"), false);
this.menu.actor.add_style_class_name('aggregate-menu');
let menuLayout = new AggregateLayout();
this.menu.box.set_layout_manager(menuLayout);
this._indicators = new St.BoxLayout({ style_class: 'panel-status-indicators-box' });
this.add_child(this._indicators);
}
});
var QuickSettings = GObject.registerClass(
class QuickSettings extends PanelMenu.Button {
_init() {
@ -453,7 +410,6 @@ class QuickSettings extends PanelMenu.Button {
const PANEL_ITEM_IMPLEMENTATIONS = {
'activities': ActivitiesButton,
'aggregateMenu': AggregateMenu,
'appMenu': AppMenuButton,
'quickSettings': QuickSettings,
'dateMenu': imports.ui.dateMenu.DateMenuButton,

View File

@ -59,7 +59,7 @@ const _modes = {
panel: {
left: [],
center: ['dateMenu'],
right: ['dwellClick', 'a11y', 'keyboard', 'quickSettings', 'aggregateMenu'],
right: ['dwellClick', 'a11y', 'keyboard', 'quickSettings'],
},
panelStyle: 'login-screen',
},
@ -71,7 +71,7 @@ const _modes = {
panel: {
left: [],
center: [],
right: ['dwellClick', 'a11y', 'keyboard', 'quickSettings', 'aggregateMenu'],
right: ['dwellClick', 'a11y', 'keyboard', 'quickSettings'],
},
panelStyle: 'unlock-screen',
},
@ -94,7 +94,7 @@ const _modes = {
panel: {
left: ['activities', 'appMenu'],
center: ['dateMenu'],
right: ['screenRecording', 'screenSharing', 'dwellClick', 'a11y', 'keyboard', 'quickSettings', 'aggregateMenu'],
right: ['screenRecording', 'screenSharing', 'dwellClick', 'a11y', 'keyboard', 'quickSettings'],
},
},
};