From ed31f08f2f6ed95a3e4a046b085d8bfa7a604e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 23 Nov 2023 15:38:25 +0100 Subject: [PATCH] apps-menu: Remove vertical separator Ever since gnome-shell stopped using a stippled separator in the calendar menu, the styling required by the separator has been missing. There haven't been any complaints about the invisible separator, so we can just as well drop it altogether. Part-of: (cherry picked from commit c3cbef19ac960deaf0cc8131a4871107bf1d1079) --- extensions/apps-menu/extension.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js index 93bea2a4..a453e6ae 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js @@ -432,15 +432,6 @@ class ApplicationsButton extends PanelMenu.Button { } } - _createVertSeparator() { - let separator = new St.DrawingArea({ - style_class: 'calendar-vertical-separator', - pseudo_class: 'highlighted', - }); - separator.connect('repaint', this._onVertSepRepaint.bind(this)); - return separator; - } - _onDestroy() { super._onDestroy(); @@ -462,21 +453,6 @@ class ApplicationsButton extends PanelMenu.Button { return super._onMenuKeyPress(actor, event); } - _onVertSepRepaint(area) { - let cr = area.get_context(); - let themeNode = area.get_theme_node(); - let [width, height] = area.get_surface_size(); - let stippleColor = themeNode.get_color('-stipple-color'); - let stippleWidth = themeNode.get_length('-stipple-width'); - let x = Math.floor(width / 2) + 0.5; - cr.moveTo(x, 0); - cr.lineTo(x, height); - Clutter.cairo_set_source_color(cr, stippleColor); - cr.setDash([1, 3], 1); // Hard-code for now - cr.setLineWidth(stippleWidth); - cr.stroke(); - } - _onOpenStateChanged(menu, open) { if (open) { if (this.reloadFlag) { @@ -583,7 +559,6 @@ class ApplicationsButton extends PanelMenu.Button { this.categoriesScrollBox.add_actor(this.categoriesBox); this.mainBox.add(this.leftBox); - this.mainBox.add_child(this._createVertSeparator()); this.mainBox.add_child(this.applicationsScrollBox); section.actor.add_actor(this.mainBox); }