apps-menu: Stop tracking icon-theme changes

St.Icon already tracks theme change, so this is no longer necessary.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/390>
This commit is contained in:
Florian Müllner
2025-03-13 22:46:51 +01:00
parent 019c935647
commit 3b4e241b26
+4 -14
View File
@@ -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;
}
}