GNOME Bugzilla – Bug 760536
ship a mini icon theme for recolarable symbolic icon assets
Last modified: 2016-01-14 22:01:55 UTC
Created attachment 318892 [details] adwaita-private mini icon theme I'm rewriting the way we do checks and radios in adwaita using the new wonders available in 3.19, trying to avoid the use of a whole bunch of assets, which are a pain to keep up to date. I still need anyway 3 recolarable assets, the only way I have atm to achieve that is by using symbolic icons, so I created a mini theme of 3 symbolic icons. I wouldn't like much to ship those in adwaita-icon-theme since the size is pretty much custom (14x14) and it doesn't sound right to me to rely on external stuff for pretty specific adwaita needs. I would like to know if it makes sense to you and if it's feasible to hide it in the resources. In case the idea is RightTM, I'd need someone to take care of the build system work.
Created attachment 318893 [details] [review] Quick and dirty patch using the said theme as assets in Adwaita
Created attachment 318894 [details] Screenshot of the assets in use
I don't see an easy way to make a resource-only private icon theme, so we may have to go back to using resources for these 3 images.
Created attachment 318980 [details] [review] theme: radios & checkboxes as buttons - use assets for overlay checkmarks and radio pills - non recolorable / doesn't work for dark
Here is an alternative suggestion that we can implement: Extend the <image> syntax to include <recolorable image> = -gtk-recolor(<image>[,<palette>]) which would do the 'symbolic' thing to <image>, using the colors from <palette>, which would default to the value of -gtk-icon-palette.
-gtk-recolor() would do the trick allowing the use of normal assets.
Created attachment 318994 [details] [review] an initial implementation
Created attachment 319041 [details] [review] icon theme: Add a way to create GtkIconInfos from files This is sometimes needed, and calling into actual icon theme code just for it is confusing - the resulting icon does not depend on the icon theme at all.
Created attachment 319042 [details] [review] icon theme: Export recoloring function This will be used in subsequent commits.
Created attachment 319043 [details] [review] Add a way to load recolored icons in CSS This can come in handy to load images that are not in an icon theme, but still benefit from symbolic recoloring.
Attachment 319041 [details] pushed as 7d717c8 - icon theme: Add a way to create GtkIconInfos from files Attachment 319042 [details] pushed as 1b0ef71 - icon theme: Export recoloring function Attachment 319043 [details] pushed as beec55a - Add a way to load recolored icons in CSS