aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/occupant_menu
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2018-01-16 16:17:42 +0100
committerfiaxh <git@mx.ax.lt>2018-01-28 00:38:47 +0100
commitca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce (patch)
tree9c8f9487904b8f59fc7edfc658e64914e4eac579 /main/src/ui/occupant_menu
parent03a349bfafe7e65abdbb692707e3361a9fdc57f4 (diff)
downloaddino-ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce.tar.gz
dino-ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce.zip
Render avatar on demand
Diffstat (limited to 'main/src/ui/occupant_menu')
-rw-r--r--main/src/ui/occupant_menu/list_row.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/ui/occupant_menu/list_row.vala b/main/src/ui/occupant_menu/list_row.vala
index 762c281b..0827ae35 100644
--- a/main/src/ui/occupant_menu/list_row.vala
+++ b/main/src/ui/occupant_menu/list_row.vala
@@ -8,7 +8,7 @@ namespace Dino.Ui.OccupantMenu {
[GtkTemplate (ui = "/im/dino/Dino/occupant_list_item.ui")]
public class ListRow : ListBoxRow {
- [GtkChild] private Image image;
+ [GtkChild] private AvatarImage image;
[GtkChild] public Label name_label;
public Account? account;
@@ -19,12 +19,12 @@ public class ListRow : ListBoxRow {
this.jid = jid;
name_label.label = Util.get_display_name(stream_interactor, jid, account);
- Util.image_set_from_scaled_pixbuf(image, (new AvatarGenerator(30, 30, image.scale_factor)).draw_jid(stream_interactor, jid, account));
+ image.set_jid(stream_interactor, jid, account);
}
public ListRow.label(string c, string text) {
name_label.label = text;
- image.set_from_pixbuf((new AvatarGenerator(30, 30, 1)).set_greyscale(true).draw_text(c)); // why 1
+ image.set_text(c);
}
}