[evolution/evolution-3-12] Bug 732892 - Scale-down contact images in message preview
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/evolution-3-12] Bug 732892 - Scale-down contact images in message preview
- Date: Wed, 16 Jul 2014 11:15:58 +0000 (UTC)
commit a93069cbfc3d4706840e482d6a7fe952a666f22f
Author: Tomas Popela <tpopela redhat com>
Date: Wed Jul 16 13:15:06 2014 +0200
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 d25a1db..42479dc 100644
--- a/addressbook/gui/widgets/eab-contact-formatter.c
+++ b/addressbook/gui/widgets/eab-contact-formatter.c
@@ -392,7 +392,8 @@ render_title_block (EABContactFormatter *formatter,
photo->data.inlined.data,
photo->data.inlined.length);
g_string_append_printf (
- buffer, "<img border=\"1\" src=\"data:%s;base64,%s\">",
+ buffer,
+ "<img id=\"__evo-contact-photo\" border=\"1\" src=\"data:%s;base64,%s\">",
photo->data.inlined.mime_type,
photo_data);
} else if (photo && photo->type == E_CONTACT_PHOTO_TYPE_URI && photo->data.uri && *photo->data.uri) {
@@ -404,7 +405,7 @@ render_title_block (EABContactFormatter *formatter,
uri = unescaped;
#endif
g_string_append_printf (
- buffer, "<img border=\"1\" src=\"%s%s\">",
+ buffer, "<img id=\"__evo-contact-photo\" border=\"1\" src=\"%s%s\">",
is_local ? "evo-" : "", uri);
#if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
g_free (unescaped);
@@ -886,7 +887,7 @@ render_compact (EABContactFormatter *formatter,
#endif
g_string_append_printf (
buffer,
- "<img width=\"%d\" height=\"%d\" src=\"%s%s\">",
+ "<img id=\"__evo-contact-photo\" width=\"%d\" height=\"%d\" src=\"%s%s\">",
calced_width, calced_height,
is_local ? "evo-" : "", uri);
#if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
@@ -900,7 +901,7 @@ render_compact (EABContactFormatter *formatter,
photo->data.inlined.length);
g_string_append_printf (
buffer,
- "<img border=\"1\" src=\"data:%s;base64,%s\" "
+ "<img id=\"__evo-contact-photo\" border=\"1\" src=\"data:%s;base64,%s\" "
"width=\"%d\" height=\"%d\">",
photo->data.inlined.mime_type,
photo_data,
diff --git a/data/webview.css b/data/webview.css
index 6a5eb1b..5c0877c 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]