This functionality is only exercised by gnome-shell, currently.
Therefore, forgetting to copy a field here means an instant
gnome-shell crash :-(. More tests needed.
Recent changes made it a breaking mistake to install symbolic icons
of the wrong size into a theme directory, or into the legacy unthemed
icon location.
Since this change affects many apps, do the extra work to keep these
icons working, but emit warnings, in the hope that this will lead to
cleaning up the mess over time.
Reuse the scale information that we have from loading icons
normally, when loading a symbolic icon, so that we apply the
same size constraints.
This commit assumes that svgs have the nominal size of the
directory they are in, which will be true for all current
symbolic icons.
Previously, we were taking thresholds and min/max sizes into
account when choosing the best theme dir, but when it came
to loading the icon, we always scaled icons from scalable
directories all the way, ignoring the min/max size limits.
This commit changes things around so that we now load icons
in Threshold directories at their nominal size, and scale
icons in Scalable directories only up to the specified limits.
To override this and keep the previous behaviour of scaling
all the way to the desired size, use the GTK_ICON_THEME_FORCE_SIZE
flag.
Add /org/gtk/libgtk/icons as a resource path, and ensure
that we always parse an index.theme file for hicolor which
makes the builtin icons available as part of the hicolor theme.
We add a new API, gtk_icon_theme_add_resource_path, which
can be used to add resource path as a base location for
icon theme content, similar to gtk_icon_theme_append_search_path.
Paradoxically, we were loading svgs at the nominal size when
FORCE_SIZE is specified, while scaling them exactly when it
isn't.
../build/win32/vs10/gtk.vcxproj
This pushes the initialization of is_svg to an earlier point
when the GtkIconInfo is created. This is needed because an icon
info doesn't necessarily always have a filename that we can later
extract the suffix from. For instance, builtin icons have NULL
filename.
https://bugzilla.gnome.org/show_bug.cgi?id=721895
When duplicating the icon_info, we forgot to set is_svg. This meant that
any application that used gtk_icon_info_load_icon_async wouldn't have
is_svg set properly.
This fixes blurry icons in the gnome-shell app picker.
This changes makes svg icons go through the same scale calculation
code as png icons. As a consequence, an svg that is put into the
32x32 directory will actually be loaded at size 32, even if it
gets requested at a bigger size. This will let us avoid giant
spinners.
https://bugzilla.gnome.org/show_bug.cgi?id=731658
Add two new icon lookup flags, GTK_ICON_LOOKUP_DIR_LTR and _RTL,
which tell GtkIconTheme to look for icon variants which have a
-ltr or -rtl suffix. GtkIconHelper adds these lookup flags when
looking up icons.
Note that due to the way this overlaps with symbolic icon lookup,
directional variants of symbolic icons must be called -symbolic-rtl, not
-rtl-symbolic.
https://bugzilla.gnome.org/show_bug.cgi?id=729980
When forcing regular or symbolic icons, fall back to the default
specified icons. This ensures that when no symbolic icon is present, an
icon will still appear - the regular one.
GTK_ICON_LOOKUP_FORCE_REGULAR and GTK_ICON_LOOKUP_FORCE_SYMBOLIC can be
used to force a regular or symbolic icon to be loaded, even if the icon
names specify a different version.
This is intended to support the CSS property -gtk-icon-style.
Commit faba7df4fe changed the logic in
apply_emblems() so that GtkIconInfo->emblems_applied would be set to
TRUE even in case there was no emblem info available, which confuses the
theme cache.
This commit changes the logic back, so that NULL is returned from
apply_emblems_to_pixbuf() when there are no emblems available, fixing
the bug.
https://bugzilla.gnome.org/show_bug.cgi?id=726830