Avatar
Object Hierarchy:
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);
}
}
Content:
Properties:
- public Pixbuf? pixbuf { get; set; }
Creation methods:
- public Avatar ()
Makes new Avatar widget
- public Avatar.from_file (string filepath, int pixel_size)
Creates a new Avatar from the specified filepath and icon size
- public Avatar.from_pixbuf (Pixbuf pixbuf)
Creates a new Avatar from the specified pixbuf
- public Avatar.with_default_icon (int pixel_size)
Creates a new Avatar with the default icon from theme without applying
the css style
Methods:
Inherited Members:
All known members inherited from class Gtk.EventBox
- above_child
- get_above_child
- get_visible_window
- set_above_child
- set_visible_window
- visible_window
All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Container
- @foreach
- add
- add_with_properties
- border_width
- check_resize
- child
- child_get
- child_get_property
- child_get_valist
- child_notify
- child_notify_by_pspec
- child_set
- child_set_property
- child_set_valist
- child_type
- class_find_child_property
- class_list_child_properties
- composite_name
- find_child_property
- forall
- forall_internal
- get_border_width
- get_child_property
- get_children
- get_focus_chain
- get_focus_child
- get_focus_hadjustment
- get_focus_vadjustment
- get_path_for_child
- get_resize_mode
- handle_border_width
- install_child_properties
- install_child_property
- list_child_properties
- propagate_draw
- remove
- resize_children
- resize_mode
- set_border_width
- set_child_property
- set_focus_chain
- set_focus_child
- set_focus_hadjustment
- set_focus_vadjustment
- set_reallocate_redraws
- set_resize_mode
- unset_focus_chain
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable
- add_child
- construct_child
- custom_finished
- custom_tag_end
- custom_tag_start
- get_internal_child
- get_name
- parser_finished
- set_buildable_property
- set_name