IconPaintable#
Superclasses: Object
Implemented Interfaces: Paintable, SymbolicPaintable
Contains information found when looking up an icon in GtkIconTheme
or loading it from a file.
GtkIconPaintable implements GdkPaintable and GtkSymbolicPaintable.
Constructors#
- class IconPaintable
- classmethod new_for_file(file: File, size: int, scale: int) IconPaintable#
Creates a
GtkIconPaintablefor a file with a given size and scale.The icon can then be rendered by using it as a
GdkPaintable.- Parameters:
file – a
GFilesize – desired icon size, in application pixels
scale – the desired scale
Methods#
- class IconPaintable
- get_file() File | None#
Gets the
GFilethat was used to load the icon.Returns
Noneif the icon was not loaded from a file.
- get_icon_name() str | None#
Get the icon name being used for this icon.
When an icon looked up in the icon theme was not available, the icon theme may use fallback icons - either those specified to
lookup_icon()or the always-available “image-missing”. The icon chosen is returned by this function.If the icon was created without an icon theme, this function returns
None.Deprecated since version 4.20: Please do not use it in newly written code