Gtk.IconPaintable¶
- Subclasses:
None
Methods¶
- Inherited:
GObject.Object (37), Gdk.Paintable (10), Gtk.SymbolicPaintable (1)
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
GObject.Object (7), Gdk.Paintable (6), Gtk.SymbolicPaintable (1)
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|||
r/w/co |
|||
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.IconPaintable(**kwargs)¶
- Bases:
- Abstract:
No
Contains information found when looking up an icon in
GtkIconTheme
.GtkIconPaintable
implementsGdkPaintable
.- classmethod new_for_file(file, size, scale)[source]¶
- Parameters:
- Returns:
a
GtkIconPaintable
containing for the icon. Unref withGObject.Object.unref
()- Return type:
Creates a
GtkIconPaintable
for a file with a given size and scale.The icon can then be rendered by using it as a
GdkPaintable
.
- get_file()[source]¶
-
Gets the
GFile
that was used to load the icon.Returns
None
if the icon was not loaded from a file.
- get_icon_name()[source]¶
- Returns:
the themed icon-name for the icon, or
None
if its not a themed icon.- Return type:
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
Gtk.IconTheme.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
.
- is_symbolic()[source]¶
-
Checks if the icon is symbolic or not.
This currently uses only the file name and not the file contents for determining this. This behaviour may change in the future.
Note that to render a symbolic
GtkIconPaintable
properly (with recoloring), you have to set its icon name on aGtkImage
.
Property Details¶
- Gtk.IconPaintable.props.file¶
- Name:
file
- Type:
- Default Value:
- Flags:
The file representing the icon, if any.
- Gtk.IconPaintable.props.icon_name¶
- Name:
icon-name
- Type:
- Default Value:
- Flags:
The icon name that was chosen during lookup.