From d93e5fe8797c7c07ab00244b1f0cc4d18e264ba7 Mon Sep 17 00:00:00 2001 From: Michael Gratton Date: Tue, 26 Feb 2019 22:53:15 +1100 Subject: [PATCH] Update avatar size to be 48px, per recommendation See #269 --- .../conversation-viewer/conversation-message.vala | 13 ++++++------- ui/conversation-message.ui | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/client/conversation-viewer/conversation-message.vala b/src/client/conversation-viewer/conversation-message.vala index 8e33505e..17614426 100644 --- a/src/client/conversation-viewer/conversation-message.vala +++ b/src/client/conversation-viewer/conversation-message.vala @@ -613,15 +613,14 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface { throw new GLib.IOError.CANCELLED("Conversation load cancelled"); } - const int PIXEL_SIZE = 32; + // We occasionally get crashes calling as below + // Gtk.Image.get_pixel_size() when the image is null. There's + // perhaps some race going on there. So we need to hard-code + // the size here and keep it in sync with + // ui/conversation-message.ui. :( + const int PIXEL_SIZE = 48; if (this.primary_originator != null) { int window_scale = get_scale_factor(); - // We occasionally get crashes calling as below - // Gtk.Image.get_pixel_size() when the image is - // null. There's perhaps some race going on there. So we - // need to hard-code the size and keep it in sync with - // ui/conversation-message.ui. :( - // //int pixel_size = this.avatar.get_pixel_size() * window_scale; int pixel_size = PIXEL_SIZE * window_scale; Gdk.Pixbuf? avatar_buf = yield loader.load( diff --git a/ui/conversation-message.ui b/ui/conversation-message.ui index 6f8db892..553e3cef 100644 --- a/ui/conversation-message.ui +++ b/ui/conversation-message.ui @@ -19,7 +19,7 @@ True False start - 32 + 48 avatar-default-symbolic