Follow

In libhandy 1.1 we will get a better API for HdyAvatar for using a custom image. You can set a GLoadableIcon (which includes GdkPixbuf and GFIleIcon) that is then loaded, resized and displayed automatically by HdyAvatar.

@exalm and @KekunPlazas helped a lot getting it merged, thank you very much.

· · Web · 1 · 9 · 13

Since the icon is property of HdyAvatar you can connect the widget directly to a libfolks contact.

In vala it will look like this:

contact.bind_property("avatar",
this.avatar,
"loadable-icon",
BindingFlags.SYNC_CREATE);

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!