From c3cbef19ac960deaf0cc8131a4871107bf1d1079 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: --- 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 0a15dda3..a25a4ab4 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.set_child(this.categoriesBox); this.mainBox.add_child(this.leftBox); - this.mainBox.add_child(this._createVertSeparator()); this.mainBox.add_child(this.applicationsScrollBox); section.actor.add_child(this.mainBox); }