iconGrid: Don't recreate StIcons on icon theme changes

Now that StIcon updates its texture automatically on icon theme
changes, we only have to recreate icon actors that aren't StIcons.

(This probably only applies to the folder icon in the app grid
where the sub-icons do use St.Icon, but making that assumption
feels dodgy with an API as generic as `createIcon()`)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3141>
This commit is contained in:
Florian Müllner 2024-01-23 23:40:04 +01:00 committed by Marge Bot
parent 671c242958
commit 8a1f44f10a

View File

@ -156,6 +156,8 @@ class BaseIcon extends Shell.SquareBin {
}
_onIconThemeChanged() {
// St.Icon updates automatically
if (!(this.icon instanceof St.Icon))
this._createIconTexture(this.iconSize);
}