Class
Adw.Avatar
Description [src]
final class Adw.Avatar : Gtk.Widget {
/* No available fields */
}
A widget displaying an image, with a generated fallback.
AdwAvatar
is a widget that shows a round avatar.
AdwAvatar
generates an avatar with the initials of the
AdwAvatar:text
on top of a colored background.
The color is picked based on the hash of the AdwAvatar:text
.
If AdwAvatar:show-initials
is set to FALSE
,
AdwAvatar:icon-name
or avatar-default-symbolic
is shown instead
of the initials.
Use AdwAvatar:custom-image
to set a custom image.
CSS nodes
AdwAvatar
has a single CSS node with name avatar
.
Available since: | 1.0 |
Instance methods
adw_avatar_draw_to_pixbuf
Renders self
into a GdkPixbuf
at size
and scale_factor
.
Available since: 1.0
adw_avatar_get_show_initials
Gets whether initials are used instead of an icon on the fallback avatar.
Available since: 1.0
adw_avatar_get_text
Gets the text used to generate the fallback initials and color.
Available since: 1.0
adw_avatar_set_show_initials
Sets whether to use initials instead of an icon on the fallback avatar.
Available since: 1.0
adw_avatar_set_text
Sets the text used to generate the fallback initials and color.
Available since: 1.0
Properties
Adw.Avatar:show-initials
Whether initials are used instead of an icon on the fallback avatar.
Available since: 1.0
Adw.Avatar:text
Sets the text used to generate the fallback initials and color.
Available since: 1.0