Avatar
Object Hierarchy:
Description:
[ CCode ( type_id = "adw_avatar_get_type ()" ) ]
public sealed class Avatar : Widget, Accessible, Buildable, ConstraintTarget
public sealed class Avatar : Widget, Accessible, Buildable, ConstraintTarget
A widget displaying an image, with a generated fallback.
<picture> <source srcset="avatar-dark.png" media="(prefers-color-scheme: dark)"> <img src="avatar.png" alt="avatar"> < /picture>
`AdwAvatar` is a widget that shows a round avatar.
`AdwAvatar` generates an avatar with the initials of the [property@Avatar:text] on top of a colored background.
The color is picked based on the hash of the [property@Avatar:text].
If [property@Avatar:show-initials] is set to `FALSE`, [property@Avatar:icon-name] or `avatar-default-symbolic` is shown instead of the initials.
Use [property@Avatar:custom-image] to set a custom image.
CSS nodes
`AdwAvatar` has a single CSS node with name `avatar`.
Namespace: Adw
Package: libadwaita-1
Content:
Properties:
Creation methods:
Methods:
Inherited Members:
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Accessible
All known members inherited from interface Gtk.Buildable