IconInfo.loadSymbolicForContext

Loads an icon, modifying it to match the system colors 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 function uses the regular foreground color and the symbolic colors with the names “success_color”, “warning_color” and “error_color” from the context.

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

See gtk.icon_info.IconInfo.loadSymbolic for more details.

class IconInfo
loadSymbolicForContext

Parameters

context gtk.style_context.StyleContext

a #GtkStyleContext

wasSymbolic bool

a #gboolean, returns whether the loaded icon was a symbolic one and whether the fg color was applied to it.

Return Value

Type: gdkpixbuf.pixbuf.Pixbuf

a #GdkPixbuf representing the loaded icon

Throws