An icon object is used to display standard icon images (“delete”, “edit”, “arrows”, etc.) or images coming from a custom file (PNG, JPG, EDJE, etc.), on icon contexts.
The icon image requested can be in the Elementary theme in use, or in
the freedesktop.org theme paths. It’s possible to set the order of
preference from where an image will be fetched.
This widget inherits from the Image one, so
that all the functions acting on it also work for icon objects.
You should be using an icon, instead of an image, whenever one of the following apply:
Default images provided by Elementary’s default theme are described below.
These are names that follow (more or less) the Freedesktop icon naming specification. Use of these names are preferred, at least if you want to give your user the ability to use other themes. All these icons can be seen in the elementary_test application, the test is called “Icon Standard”.
folder (since 1.13)user-home (since 1.13)user-trash (since 1.13)view-close (since 1.13)view-refresh (since 1.13)window-close 1.13)document-close (since 1.13)document-edit (since 1.13)dialog-info (since 1.13)dialog-close (since 1.13)arrow-up (since 1.13)arrow-down (since 1.13)arrow-left (since 1.13)arrow-right (since 1.13)arrow-up-left (since 1.13)arrow-up-right (since 1.13)arrow-down-left (since 1.13)arrow-down-right (since 1.13)edit-delete (since 1.13)application-chat (since 1.13)application-clock (since 1.13)media-seek-forward 1.13)media-seek-backward (since 1.13)media-skip-forward (since 1.13)media-skip-backward (since 1.13)media-playback-pause (since 1.13)media-playback-start (since 1.13)media-playback-stop (since 1.13)media-eject (since 1.13)audio-volume (since 1.13)audio-volume-muted (since 1.13)These are names for icons that were first intended to be used in toolbars, but can be used in many other places too:
homecloseappsarrow_uparrow_downarrow_leftarrow_rightchatclockdeleteeditrefreshfolderfileThese are names for icons that were designed to be used in menus (but again, you can use them anywhere else):
menu/homemenu/closemenu/appsmenu/arrow_upmenu/arrow_downmenu/arrow_leftmenu/arrow_rightmenu/chatmenu/clockmenu/deletemenu/editmenu/refreshmenu/foldermenu/fileAnd these are names for some media player specific icons:
media_player/forwardmedia_player/infomedia_player/nextmedia_player/pausemedia_player/playmedia_player/prevmedia_player/rewindmedia_player/stopefl.elementary.Icon(Object parent, *args, **kwargs)¶Bases: efl.elementary.__init__.Image
| Parameters: |
|
|---|
callback_thumb_done_del(func)¶callback_thumb_error_del(func)¶order_lookup¶The icon lookup order used by standard.
| Type: | Icon lookup modes |
|---|
order_lookup_get()¶order_lookup_set(order)¶standard¶The icon standards name.
For example, freedesktop.org defines standard icon names such as
“home”, “network”, etc. There can be different icon sets to match
those icon keys. The name given as parameter is one of these
“keys”, and will be used to look in the freedesktop.org paths and
elementary theme. One can change the lookup order with
order_lookup.
If name is not found in any of the expected locations and it is the absolute path of an image file, this image will be used.
Note
The icon image set can be changed by
file.
See also
file
| Type: | string |
|---|---|
| Raises: | RuntimeWarning – when setting the standard name fails. |
| Return bool: | For 1.7 compatibility standard_set() returns a bool value that tells whether setting the standard name was successful or not. |
Changed in version 1.8: Raises RuntimeWarning when setting the standard name fails, instead of returning a bool.
standard_get()¶standard_set(name)¶thumb¶Set the file (and edje group) that will be used, but use a generated thumbnail.
This functions like file but
requires the Ethumb library support to be enabled successfully with
efl.elementary.need.need_ethumb(). When set the file indicated
has a thumbnail generated and cached on disk for future use or will
directly use an existing cached thumbnail if it is valid.
| Type: | string file or tuple(string file, string group) |
|---|
thumb_set(filename, group=None)¶