GNOME Bugzilla – Bug 751411
GtkIconTheme: icon size selection issues when theme doesn't have the exact fixed size
Last modified: 2018-04-15 00:04:23 UTC
When using Oxygen icon theme for example, the toolbar icons (in gtk3-demo-application, meld, ...) are big. When asked for a 24px icon, gtk_icon_set_render_icon_pixbuf_for_scale loads a 32px one, despite Oxygen having a 22px directory with Threshold type (so which should be used for sizes from 20px to 24px). In gtkicontheme.c : - In compare_dir_matches, I think the "*always* prefer downscaling" logic should only be enabled when the GTK_ICON_LOOKUP_FORCE_SIZE flag is set. If the application won't scale the icon, but modify the layout, it's better to use the nearest size. - The theme_lookup_icon result depends on the order of directories. If we see a directory with difference == 0 (Threshold type, so size could still be different from requested_size), then another one with difference != 0, the second one could be used due to the "prefer downscaling" code in compare_dir_matches. But if they come in the opposite order, the one with difference == 0 will always be used (difference_a == 0, difference_b != 0 in compare_dir_matches).
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new