[geary] Scale inline images w/ regard to aspect ration: Closes bgno#713922
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Scale inline images w/ regard to aspect ration: Closes bgno#713922
- Date: Tue, 7 Jan 2014 02:34:25 +0000 (UTC)
commit b2f20107df78bd828f7c5f03d1b8c9de0269a578
Author: Robert Schroll <rschroll gmail com>
Date: Mon Jan 6 18:32:09 2014 -0800
Scale inline images w/ regard to aspect ration: Closes bgno#713922
Required for images referenced by Content-ID.
.../conversation-viewer/conversation-viewer.vala | 6 ++++--
theming/message-viewer.css | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala
b/src/client/conversation-viewer/conversation-viewer.vala
index f4b2094..145acf4 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -31,6 +31,7 @@ public class ConversationViewer : Gtk.Box {
private const string MESSAGE_CONTAINER_ID = "message_container";
private const string SELECTION_COUNTER_ID = "multiple_messages";
private const string SPINNER_ID = "spinner";
+ private const string REPLACED_IMAGE_CLASS = "replaced_inline_image";
private const string DATA_IMAGE_CLASS = "data_inline_image";
private const int MAX_INLINE_IMAGE_MAJOR_DIM = 1024;
@@ -755,8 +756,9 @@ public class ConversationViewer : Gtk.Box {
debug("Unable to load and rotate image %s for display: %s", filename, err.message);
}
- return "<img alt=\"%s\" class=\"%s\" src=\"%s\" />".printf(
- filename, DATA_IMAGE_CLASS, assemble_data_uri(content_type.get_mime_type(), rotated_image));
+ return "<img alt=\"%s\" class=\"%s %s\" src=\"%s\" />".printf(
+ filename, DATA_IMAGE_CLASS, REPLACED_IMAGE_CLASS,
+ assemble_data_uri(content_type.get_mime_type(), rotated_image));
}
// Called by Gdk.PixbufLoader when the image's size has been determined but not loaded yet ...
diff --git a/theming/message-viewer.css b/theming/message-viewer.css
index 926b39b..223af81 100644
--- a/theming/message-viewer.css
+++ b/theming/message-viewer.css
@@ -203,7 +203,7 @@ body:not(.nohide) .email.hide .header_container .avatar {
margin-right: -0.67em;
}
-.email .data_inline_image {
+.email .replaced_inline_image {
max-width: 100%;
display: block;
margin-top: 1em;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]