IconInfo.loadSymbolic

gdkpixbuf.pixbuf.Pixbuf loadSymbolic(gdk.rgba.RGBA fg, gdk.rgba.RGBA successColor, gdk.rgba.RGBA warningColor, gdk.rgba.RGBA errorColor, out bool wasSymbolic)

Loads an icon, modifying it to match the system colours for the foreground, success, warning and error colors provided. If the icon is not a symbolic one, the function will return the result from [gtk.icon_info.IconInfo.loadIcon].

This allows loading symbolic icons that will match the system theme.

Unless you are implementing a widget, you will want to use [gio.themed_icon.ThemedIcon.newWithDefaultFallbacks] to load the icon.

As implementation details, the icon loaded needs to be of SVG type, contain the “symbolic” term as the last component of the icon name, and use the “fg”, “success”, “warning” and “error” CSS styles in the SVG file itself.

See the Symbolic Icons Specification for more information about symbolic icons.

Parameters

fga #GdkRGBA representing the foreground color of the icon
successColora #GdkRGBA representing the warning color of the icon or null to use the default color
warningColora #GdkRGBA representing the warning color of the icon or null to use the default color
errorColora #GdkRGBA representing the error color of the icon or null to use the default color (allow-none)
wasSymbolica #gboolean, returns whether the loaded icon was a symbolic one and whether the fg color was applied to it.

Returns

a #GdkPixbuf representing the loaded icon

Throws

[ErrorWrap]