From a4134e1559c3f59bd0d553703e5d3b1f7a28d703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 3 Aug 2022 06:11:33 +0200 Subject: [PATCH] panel: Remove aggregate menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The menu has served us well over the years, but it is finally time to retire it. τετέλεσται Part-of: --- .../gnome-shell-sass/widgets/_popovers.scss | 22 ---------- js/ui/panel.js | 44 ------------------- js/ui/sessionMode.js | 6 +-- 3 files changed, 3 insertions(+), 69 deletions(-) diff --git a/data/theme/gnome-shell-sass/widgets/_popovers.scss b/data/theme/gnome-shell-sass/widgets/_popovers.scss index 3b1d5edc0..138a4fc0f 100644 --- a/data/theme/gnome-shell-sass/widgets/_popovers.scss +++ b/data/theme/gnome-shell-sass/widgets/_popovers.scss @@ -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; diff --git a/js/ui/panel.js b/js/ui/panel.js index ebe69e450..24248865b 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -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, diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index d9dbdefc6..b38bcdfab 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -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'], }, }, };