ThemedIcon
Superclasses: Object
Implemented Interfaces: Icon
- Constructors:
ThemedIcon(**properties)
new(iconname:str) -> Gio.ThemedIcon
new_from_names(iconnames:list) -> Gio.ThemedIcon
new_with_default_fallbacks(iconname:str) -> Gio.ThemedIcon
Constructors
- class ThemedIcon
- classmethod new(iconname: str) ThemedIcon
Creates a new themed icon for
iconname
.- Parameters:
iconname – a string containing an icon name.
- classmethod new_from_names(iconnames: Sequence[str]) ThemedIcon
Creates a new themed icon for
iconnames
.- Parameters:
iconnames – an array of strings containing icon names.
- classmethod new_with_default_fallbacks(iconname: str) ThemedIcon
Creates a new themed icon for
iconname
, and all the names that can be created by shorteningiconname
at ‘-’ characters.In the following example,
icon1
andicon2
are equivalent:const char *names[] = { "gnome-dev-cdrom-audio", "gnome-dev-cdrom", "gnome-dev", "gnome" }; icon1 = g_themed_icon_new_from_names (names, 4); icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
- Parameters:
iconname – a string containing an icon name
Methods
Properties
- class ThemedIcon
-
- props.use_default_fallbacks: bool
Whether to use the default fallbacks found by shortening the icon name at ‘-’ characters. If the “names” array has more than one element, ignores any past the first.
For example, if the icon name was “gnome-dev-cdrom-audio”, the array would become
{ "gnome-dev-cdrom-audio", "gnome-dev-cdrom", "gnome-dev", "gnome", NULL };