From 3b4e241b26b504eb0638b736221673312c6b26da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 13 Mar 2025 22:46:51 +0100 Subject: [PATCH] apps-menu: Stop tracking icon-theme changes St.Icon already tracks theme change, so this is no longer necessary. Part-of: --- extensions/apps-menu/extension.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js index c9deecfa..c89d21d7 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js @@ -44,8 +44,9 @@ class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem { this._app = app; this._button = button; - this._iconBin = new St.Bin(); - this.add_child(this._iconBin); + this._icon = this.getDragActor(); + this._icon.style_class = 'icon-dropshadow'; + this.add_child(this._icon); let appLabel = new St.Label({ text: app.get_name(), @@ -55,11 +56,6 @@ class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem { this.add_child(appLabel); this.label_actor = appLabel; - let textureCache = St.TextureCache.get_default(); - textureCache.connectObject('icon-theme-changed', - () => this._updateIcon(), this); - this._updateIcon(); - this._delegate = this; let draggable = DND.makeDraggable(this); @@ -95,13 +91,7 @@ class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem { } getDragActorSource() { - return this._iconBin; - } - - _updateIcon() { - let icon = this.getDragActor(); - icon.style_class = 'icon-dropshadow'; - this._iconBin.set_child(icon); + return this._icon; } }