From 968a7477c72124fc0f7af837b4894db6ee4553d2 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Wed, 16 Jul 2014 10:55:48 +0200 Subject: Bug 732892 - Scale-down contact images in message preview Set the maximal width and height of the contact image to 96 px. Also do the same in the contact preview in addressbook. --- addressbook/gui/widgets/eab-contact-formatter.c | 9 +++++---- data/webview.css | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/addressbook/gui/widgets/eab-contact-formatter.c b/addressbook/gui/widgets/eab-contact-formatter.c index 30b397d1c6..6aa45c966c 100644 --- a/addressbook/gui/widgets/eab-contact-formatter.c +++ b/addressbook/gui/widgets/eab-contact-formatter.c @@ -537,7 +537,8 @@ render_title_block (EABContactFormatter *formatter, photo->data.inlined.data, photo->data.inlined.length); g_string_append_printf ( - buffer, "", + buffer, + "", photo->data.inlined.mime_type, photo_data); } else if (photo && photo->type == E_CONTACT_PHOTO_TYPE_URI && photo->data.uri && *photo->data.uri) { @@ -549,7 +550,7 @@ render_title_block (EABContactFormatter *formatter, uri = unescaped; #endif g_string_append_printf ( - buffer, "", + buffer, "", is_local ? "evo-" : "", uri); #if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2) g_free (unescaped); @@ -1068,7 +1069,7 @@ render_compact (EABContactFormatter *formatter, #endif g_string_append_printf ( buffer, - "", + "", calced_width, calced_height, is_local ? "evo-" : "", uri); #if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2) @@ -1082,7 +1083,7 @@ render_compact (EABContactFormatter *formatter, photo->data.inlined.length); g_string_append_printf ( buffer, - "", photo->data.inlined.mime_type, photo_data, diff --git a/data/webview.css b/data/webview.css index 6a5eb1b00f..5c0877c916 100644 --- a/data/webview.css +++ b/data/webview.css @@ -23,6 +23,11 @@ span.navigable, div.navigable, p.navigable { color: #003399; } +img#__evo-contact-photo { + max-width: 96px; + max-height: 96px; +} + img.navigable { cursor: pointer; margin-right: 4px; -- cgit v1.2.3