An Elementary photo widget is intended for displaying a photo, for ex., a person’s image (contact).
Simple, yet with a very specific purpose. It has a decorative frame around the inner image itself, on the default theme.
This widget relies on an internal Icon
, so
that the APIs of these two widgets are similar (drag and drop is also possible
here, for example).
clicked
- This is called when a user has clicked the photodrag,start
- One has started dragging the inner image out of the photo’s
framedrag,end
- One has dropped the dragged image somewhere
efl.elementary.
Photo
(Object parent, *args, **kwargs)¶Bases: efl.elementary.__init__.Object
Parameters: |
|
---|
aspect_fixed
¶Whether the original aspect ratio of the photo should be kept on resize.
The original aspect ratio (width / height) of the photo is usually distorted to match the object’s size. Enabling this option will fix this original aspect, and the way that the photo is fit into the object’s area
Type: | bool |
---|
aspect_fixed_get
()¶aspect_fixed_set
(fixed)¶callback_clicked_add
(func, *args, **kwargs)¶This is called when a user has clicked the photo.
callback_clicked_del
(func)¶callback_drag_end_add
(func, *args, **kwargs)¶One has dropped the dragged image somewhere.
callback_drag_end_del
(func)¶callback_drag_start_add
(func, *args, **kwargs)¶One has started dragging the inner image out of the photo’s frame.
callback_drag_start_del
(func)¶editable
¶Set editability of the photo.
An editable photo can be dragged to or from, and can be cut or pasted too. Note that pasting an image or dropping an item on the image will delete the existing content.
Type: | bool |
---|
editable_set
(fill)¶file
¶Set the file that will be used as photo
Type: | string |
---|---|
Raises RuntimeError: | |
when setting the file fails |
Changed in version 1.8: Raises RuntimeError if setting the file fails
file_set
(filename)¶fill_inside
¶Set if the photo should be completely visible or not.
Type: | bool |
---|
fill_inside_set
(fill)¶size
¶Set the size that will be used on the photo.
Type: | int |
---|
size_set
(size)¶thumb
¶Set the file that will be used as thumbnail in the photo.
Type: | string or tuple of strings |
---|
thumb_set
(filename, group=None)¶