icons: Set is_symbolic in IconPaintable.new_for_file

Otherwise symbolic icons won't be recognized as such.
Currently, in apps like Icon Library / App Icon Preview. Trying to
render the generated on-fly symbolic icons, require caching them in a
directory that mimics an icon theme and updating the search path of the
default gtk::IconTheme. That is mostly because
Gtk.IconPaintable.new_for_file wouldn't set is-symbolic even if the
passed file is a symbolic icon.
This would allow us to remove all the hacks in our apps
This commit is contained in:
Bilal Elmoussaoui 2024-02-23 18:43:06 +01:00
parent 96b30073cf
commit 4eb7208e35

View File

@ -4013,6 +4013,7 @@ gtk_icon_paintable_new_for_file (GFile *file,
}
icon->is_svg = suffix_from_name (icon->filename) == ICON_CACHE_FLAG_SVG_SUFFIX;
icon->is_symbolic = icon_uri_is_symbolic (icon->filename, -1);
return icon;
}