GNOME Bugzilla – Bug 792738
GtkIconTheme ignores exact size match for builtin icons
Last modified: 2018-02-18 03:06:32 UTC
Created attachment 367157 [details] [review] Fix incorrect optimization in find_builtin_icon() I am attaching a patch to fix an incorrect optimization in find_builtin_icon(). When we found an icon with exactly the requested size, we'd stop searching immediately (good), but we'd neglect to set the returned min_difference to 0 (bad). This caused theme_lookup_icon() to prefer other, potentially much worse, matches over the exact one. This would only affect applications using gtk_icon_theme_add_builtin_icon(), which is probably why it hasn't been noticed before.
Created attachment 367164 [details] [review] Fix incorrect optimization in find_builtin_icon() Earlier patch wasn't quite correct, still returned the wrong min_difference if there was an exact match but also a larger size of the icon.
Review of attachment 367164 [details] [review]: seems right