appIndicator: Refactor named icons lookup and loading by 3v1n0 · Pull Request #415 · ubuntu/gnome-shell-extension-appindicator (original) (raw)

@3v1n0

@3v1n0

@3v1n0

@3v1n0

The gicon icon size is used only for loading the textures so it only matters for us when we pass a path to StTextureCache, and it's generally provided by the theme, however in case that's not the case we need to update it only when it changes, there's no need to do it more times.

@3v1n0

We only can update the icons if we're ready and mapped, otherwise it does not make sense, so ensure this is the case, waiting in case.

@3v1n0

…erences

St.Icon uses the loading size of the icon depending on the theme value for the icon size, so we should honor this, but also we want to be sure that the loaded icon will respect the user defined settings, so we override such value in case the values do not match.

@3v1n0

We still prefer to see something than nothing

@3v1n0

We used to always looking up for the icons ourself, somewhat duplicating the shell work, it allowed to prevent shell caching of some files, but still we can remove lots of deprecated code and handle things more smartly given that texture-caching can be good in case of well-known files.

In short:

@3v1n0

@3v1n0

It's better to a wait a bit more before emitting properties changes so that they can be grouped together, for example the icon-theme path and the icon name should go together

@3v1n0 3v1n0 mentioned this pull request

Mar 14, 2023

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})