After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751411 - GtkIconTheme: icon size selection issues when theme doesn't have the exact fixed size
GtkIconTheme: icon size selection issues when theme doesn't have the exact fi...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-06-23 21:36 UTC by loic.yhuel
Modified: 2018-04-15 00:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description loic.yhuel 2015-06-23 21:36:26 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).
Comment 1 Matthias Clasen 2018-02-10 05:14:59 UTC
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.
Comment 2 Matthias Clasen 2018-04-15 00:04:23 UTC
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