GNOME Bugzilla – Bug 643738
Icons in dash/app view/search results don't adjust to icon theme changes
Last modified: 2011-03-04 00:44:39 UTC
See attached patch.
Created attachment 182318 [details] [review] base-icon: Always recreate icon texture on style changes Currently the icon texture is only updated on style changes when the icon size is set from CSS and differs from the previously used icon size. As the style change may have been triggered by an icon theme change, textures that are created for themed icons should always be recreated; given that this is the case for most uses (with the exception of file thumbnails), recreate the icon texture unconditionally to avoid complexity.
Review of attachment 182318 [details] [review]: can you rework _setIconSize into _createIconTexture? reads weird like this.
Created attachment 182362 [details] [review] base-icon: Always recreate icon texture on style changes (In reply to comment #2) > can you rework _setIconSize into _createIconTexture? reads weird like this. Sure. (Alternatively I could use _updateIconTexture() instead and discard the changes to _init())
Review of attachment 182362 [details] [review]: Looks good reading it, but before committing, can you add some logging to createIconTextureto make sure that the icon is loaded only once at creation time?
Created attachment 182407 [details] [review] base-icon: Always recreate icon texture on style changes (In reply to comment #4) > Looks good reading it, but before committing, can you add some logging to > createIconTextureto make sure that the icon is loaded only once at creation > time? Right - it is loaded once at creation time, and then recreated on style change when the actor is mapped. I can't think of anything which would require the texture before style-changed, so omit loading it in the constructor ...
Review of attachment 182407 [details] [review]: Let's go with this, has some interaction with the question of when we emit ::style-set and the :first-child issue (bug 627083), but those issues are all over the code.
(In reply to comment #6) > Let's go with this OK. Attachment 182407 [details] pushed as e01971e - base-icon: Always recreate icon texture on style changes