Picture#
- class ignis.widgets.Widget.Picture(content_fit: str = 'contain', width: int = -1, height: int = -1, **kwargs)#
Bases:
Gtk.Picture
A widget that displays an image at its native aspect ratio.
- Overrided properties:
content_fit: Controls how a content should be made to fit inside an allocation. Default:
contain
.
- Content fit:
fill: Make the content fill the entire allocation, without taking its aspect ratio in consideration.
contain: Scale the content to fit the allocation, while taking its aspect ratio in consideration..
cover: Cover the entire allocation, while taking the content aspect ratio in consideration.
scale_down: The content is scaled down to fit the allocation, if needed, otherwise its original size is used.
For more info, see
Gtk.ContentFit
.
Widget.Picture( image='path/to/img', width=20, height=30 )