techee commented on this pull request.


>  
        ctype = g_content_type_guess(path, NULL, 0, NULL);
        icon = g_content_type_get_icon(ctype);
        g_free(ctype);
 
        if (icon != NULL)
        {
-               gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, NULL);
-               info = 
gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, width, 
GTK_ICON_LOOKUP_USE_BUILTIN);
-               g_object_unref(icon);
+               info = 
gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, 16, 0);

Notice that the constant GTK_ICON_LOOKUP_USE_BUILTIN  was used for the last 
parameter which is flags - I believe this is why the icons looked differently 
on macOS so I used 0.

The width was determined by 
https://developer.gnome.org/gtk3/stable/gtk3-Themeable-Stock-Images.html#gtk-icon-size-lookup
 but based on the documentation this function shouldn't be needed and 
GTK_ICON_SIZE_MENU is 16px. I use the same in ProjectOrganizer and it seems to 
work fine.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/927#discussion_r334291323

Reply via email to