It derives from <GtkWidget>.
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 Avatar:text on top of a colored background.
The color is picked based on the hash of the Avatar:text.
If Avatar:show-initials is set to FALSE,
Avatar:icon-name or adw-avatar-default-symbolic is shown
instead of the initials.
Use Avatar:custom-image to set a custom image.
<AdwAvatar> has a single CSS node with name
avatar.
<AdwAvatar> uses the Gtk.AccessibleRole.img
role.
A custom image paintable.
Custom image is displayed instead of initials or icon.
Its value is a <GdkPaintable>, or #f.
Set it with (set! (avatar:custom-image self) value).
The name of an icon to use as a fallback.
If no name is set, adw-avatar-default-symbolic will be used.
Its value is a string, or #f.
Set it with (set! (avatar:icon-name self) value).
Whether initials are used instead of an icon on the fallback avatar.
See Avatar:icon-name for how to change the fallback icon.
Its value is a boolean.
Set it with (set! (avatar:show-initials self) value).
The size of the avatar.
Its value is a 32-bit integer.
Set it with (set! (avatar:size self) value).
Sets the text used to generate the fallback initials and color.
It’s only used to generate the color if Avatar:show-initials is
FALSE.
Its value is a string, or #f.
Set it with (set! (avatar:text self) value).
Renders self into a <GdkTexture> at
scale-factor.
This can be used to export the fallback avatar.
Passed: a <AdwAvatar>.
an avatar
Passed: a 32-bit integer.
The scale factor
Returned: a <GdkTexture>.
the texture
Gets the custom image paintable.
Passed: a <AdwAvatar>.
an avatar
Returned: a <GdkPaintable>, or #f.
the custom image
Gets the name of an icon to use as a fallback.
Passed: a <AdwAvatar>.
an avatar
Returned: a string, or #f.
the icon name
Gets whether initials are used instead of an icon on the fallback avatar.
Passed: a <AdwAvatar>.
an avatar
Returned: a boolean.
whether initials are used instead of an icon as fallback
Gets the size of the avatar.
Passed: a <AdwAvatar>.
an avatar
Returned: a 32-bit integer.
the size of the avatar
Gets the text used to generate the fallback initials and color.
Passed: a <AdwAvatar>.
an avatar
Returned: a string, or #f.
the text used to generate the fallback initials and color
Creates a new <AdwAvatar>.
Passed: a 32-bit integer.
The size of the avatar
Passed: a string, or #f.
the text used to get the initials and color
Passed: a boolean.
whether to use initials instead of an icon as fallback
Returned: a <GtkWidget>.
the newly created <AdwAvatar>
Sets the custom image paintable.
Custom image is displayed instead of initials or icon.
Passed: a <AdwAvatar>.
an avatar
Passed, or left out: a <GdkPaintable>, or
#f.
a custom image
Sets the name of an icon to use as a fallback.
If no name is set, adw-avatar-default-symbolic will be used.
Passed: a <AdwAvatar>.
an avatar
Passed, or left out: a string, or #f.
the icon name
Sets whether to use initials instead of an icon on the fallback avatar.
See Avatar:icon-name for how to change the fallback icon.
Passed: a <AdwAvatar>.
an avatar
Passed: a boolean.
whether to use initials instead of an icon as fallback
Sets the size of the avatar.
Passed: a <AdwAvatar>.
an avatar
Passed: a 32-bit integer.
The size of the avatar
Sets the text used to generate the fallback initials and color.
It’s only used to generate the color if Avatar:show-initials is
FALSE.
Passed: a <AdwAvatar>.
an avatar
Passed, or left out: a string, or #f.
the text used to get the initials and color