![](https://secure.gravatar.com/avatar/84524eb6e916f5d548e7c7c0e41fd127.jpg?s=120&d=mm&r=g)
On Wed, 2016-05-04 at 11:02 +0100, Alex Valavanis wrote:
Thanks Tav, that's great news. Completely agreed that we should unify a lot of our icon handling code. Krzysztof and I discussed this briefly at the Hackfest. I think we should seriously consider moving towards a more standard way of installing our icon theme.
Our current method of pulling multiple icons in from a single SVG document is perhaps a more "Inkscape-esque" way of doing things than reading from individual SVG/bitmap icon files. However, it's not very friendly for GNOME theme designers and requires quite a lot of custom code rather than being handled simply through a GtkIconTheme instance.
I absolutely agree... but...
I spent some time looking at what needs to be done and I've come across a problem:
We use gtk_icon_size_register() to add a custom logical icon size to the GtkIconSize enum. This is deprecated. The documentation says to use GtkIconTheme instead. But GtkIconTheme (using physical icon sizes) returns a GdkPixbuf. To get a GtkImage widget, one can use gtk_image_new_from_pixbuf() but the comment states that this widget will not react to state changes. If you want it to react to state changes use gtk_image_new_from_icon_name()... which requires passing a GtkIconSize.
Tav