Avatar


Object Hierarchy:

Hdy.Avatar Hdy.Avatar Hdy.Avatar Gtk.DrawingArea Gtk.DrawingArea Gtk.DrawingArea->Hdy.Avatar Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.DrawingArea GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Hdy.Avatar Atk.Implementor->Gtk.DrawingArea Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Hdy.Avatar Gtk.Buildable->Gtk.DrawingArea Gtk.Buildable->Gtk.Widget

Description:

[ CCode ( type_id = "hdy_avatar_get_type ()" ) ]
[ Version ( since = "1.0" ) ]
public class Avatar : DrawingArea, Implementor, Buildable

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 [ 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`, `avatar-default-symbolic` is shown instead of the initials.

Use [[email protected]_loadable_icon] or [property@Avatar:loadable-icon] to set a custom image.

CSS nodes

`HdyAvatar` has a single CSS node with name `avatar`.


Namespace: Hdy
Package: libhandy-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 Atk.Implementor
All known members inherited from interface Gtk.Buildable



2022 vala-language.org