[geary/wip/3.32-avatars: 1/5] Update avatar size to be 48px, per recommendation
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/3.32-avatars: 1/5] Update avatar size to be 48px, per recommendation
- Date: Thu, 28 Feb 2019 07:43:57 +0000 (UTC)
commit 3ebce41ac380b4b020dba0f8657678b886d42332
Author: Michael Gratton <mike vee net>
Date: Tue Feb 26 22:53:15 2019 +1100
Update avatar size to be 48px, per recommendation
See #269
src/client/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 7d6fe7f4..9256c3b7 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 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
- <property name="pixel_size">32</property>
+ <property name="pixel_size">48</property>
<property name="icon_name">avatar-default-symbolic</property>
</object>
<packing>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]