Skip to content

Commit eebd707

Browse files
committed
treebrowser: Force icon sizes
Force using the same icon size for all file types even if the theme in use doesn't have the requested size to avoid varying icon sizes. Closes geany#1416.
1 parent 2107c89 commit eebd707

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

treebrowser/src/treebrowser.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,17 @@ utils_pixbuf_from_path(gchar *path)
231231

232232
if (icon != NULL)
233233
{
234+
const GtkIconLookupFlags flags = GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_FORCE_SIZE;
235+
234236
gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, NULL);
235-
info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, width, GTK_ICON_LOOKUP_USE_BUILTIN);
237+
info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, width, flags);
236238
g_object_unref(icon);
237239
if (!info)
238240
{
239241
icon = g_themed_icon_new("text-x-generic");
240242
if (icon != NULL)
241243
{
242-
info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, width, GTK_ICON_LOOKUP_USE_BUILTIN);
244+
info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, width, flags);
243245
g_object_unref(icon);
244246
}
245247
}

0 commit comments

Comments
 (0)