Avatar


Object Hierarchy:

Granite.Widgets.Avatar Granite.Widgets.Avatar Granite.Widgets.Avatar Gtk.EventBox Gtk.EventBox Gtk.EventBox->Granite.Widgets.Avatar Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.EventBox Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.EventBox Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.EventBox Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget

Description:


[ Version ( deprecated = true , deprecated_since = "6.0.0" , replacement = "Hdy.Avatar" ) ]
public class Avatar : EventBox

Warning: Avatar is deprecated since 6.0.0. Use Hdy.Avatar.

The Avatar widget allowes to theme & crop images with css BORDER_RADIUS property in the .avatar class.

Example

public class AvatarView : Gtk.Grid {
construct {
var username = GLib.Environment.get_user_name ();
var iconfile = @"/var/lib/AccountsService/icons/$username";

var avatar_dialog = new Granite.Widgets.Avatar.from_file (iconfile, 48);

var avatar_default_dialog = new Granite.Widgets.Avatar.with_default_icon (48);

row_spacing = 6;
halign = Gtk.Align.CENTER;
valign = Gtk.Align.CENTER;
attach (avatar_dialog, 0, 0, 1, 1);
attach (avatar_default_dialog, 0, 1, 1, 1);
}
}


Namespace: Granite.Widgets
Package: granite

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor