Class
HandyAvatar
Description [src]
final class Handy.Avatar : Gtk.DrawingArea {
/* No available fields */
}
A widget displaying an image, with a generated fallback.
HdyAvatar is a widget to display a round avatar.
A provided image is made round before displaying, if no image is given this
widget generates a round fallback with the initials of the
HdyAvatar:text on top of a colored background.
The color is picked based on the hash of the HdyAvatar:text.
If HdyAvatar:show-initials is set to FALSE,
avatar-default-symbolic is shown instead of the initials.
Use hdy_avatar_set_loadable_icon() or HdyAvatar:loadable-icon to
set a custom image.
CSS nodes
HdyAvatar has a single CSS node with name avatar.
| Available since: | 1.0 |
Instance methods
hdy_avatar_draw_to_pixbuf
Renders self into a GdkPixbuf at size and scale_factor.
Available since: 1.2
hdy_avatar_draw_to_pixbuf_async
Renders asynchronously self into a pixbuf at size and scale_factor.
Available since: 1.2
hdy_avatar_draw_to_pixbuf_finish
Finishes an asynchronous draw of an avatar to a pixbuf.
Available since: 1.2
hdy_avatar_get_loadable_icon
Gets the GLoadableIcon set via hdy_avatar_set_loadable_icon().
Available since: 1.2
hdy_avatar_get_show_initials
Gets whether initials are used instead of an icon on the fallback avatar.
Available since: 1.0
hdy_avatar_get_text
Gets the text used to generate the fallback initials and color.
Available since: 1.0
hdy_avatar_set_image_load_func
A callback which is called when the custom image needs to be reloaded.
Available since: 1.0
Deprecated since: 1.2
hdy_avatar_set_show_initials
Sets whether to use initials instead of an icon on the fallback avatar.
Available since: 1.0
Properties
Handy.Avatar:show-initials
Whether to show the initials or the fallback icon on the generated avatar.
Available since: 1.0
Handy.Avatar:text
Sets the text used to generate the fallback initials and color.
Available since: 1.0