ThemedIcon#
Superclasses: Object
Implemented Interfaces: Icon
GThemedIcon is an implementation of Icon that supports icon
themes.
GThemedIcon contains a list of all of the icons present in an icon
theme, so that icons can be looked up quickly. GThemedIcon does
not provide actual pixmaps for icons, just the icon names.
Ideally something like choose_icon should be used to
resolve the list of names so that fallback icons work nicely with
themes that inherit other themes.
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: list[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 shorteningiconnameat ‘-’ characters.In the following example,
icon1andicon2are 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