load_symbolic_icon
Description:
public Pixbuf? load_symbolic_icon (StyleContext style, string iconname, int size)
Warning: load_symbolic_icon is deprecated since 5.2.4.
Loads a symbolic icon for the given icon name with a better chance for loading a symbolic icon in case of fallback than with Gtk.IconTheme.load_icon
Note that the resulting pixbuf may not be exactly the requested size; an icon theme may have icons that differ slightly from their nominal sizes, and in addition GTK+ will avoid scaling icons that it considers sufficiently close to the requested size or for which the source image would have to be scaled up too far (this maintains sharpness).
Due to the way Gtk.IconLookupFlags.GENERIC_FALLBACK works, Gtk readily falls back to the non-symbolic icon if the exact match for the provided name is not found, and only after that fails tries to look up alternative names of the icon itself. This function uses the same mechanism, but looks up the symbolic icon for the name chosen after all the fallbacks, and returns the symbolic one if it's present. This gives a better chance of getting a symbolic icon in case of fallbacks than when using Gtk.IconTheme.load_icon
Returns:
a Gdk.Pixbuf with the rendered icon; this may be a newly created icon or a new reference to an internal icon, so you must not modify the icon. Returns null if the icon was not found in the theme hierarchy. |