[evolution] Bug #696531 - Force white background for HTML parts



commit 2a0d0870ca79f164275173828a1c1500833e8570
Author: Milan Crha <mcrha redhat com>
Date:   Fri May 3 11:03:35 2013 +0200

    Bug #696531 - Force white background for HTML parts

 em-format/e-mail-formatter-text-html.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/em-format/e-mail-formatter-text-html.c b/em-format/e-mail-formatter-text-html.c
index 2b8eb56..bef29a3 100644
--- a/em-format/e-mail-formatter-text-html.c
+++ b/em-format/e-mail-formatter-text-html.c
@@ -140,8 +140,6 @@ emfe_text_html_format (EMailFormatterExtension *extension,
                return FALSE;
 
        if (context->mode == E_MAIL_FORMATTER_MODE_RAW) {
-               /* FORMATTER FIXME: Shouldn't we have some extra method for
-                * BASE64 and QP decoding?? */
                e_mail_formatter_format_text (formatter, part, stream, cancellable);
 
        } else if (context->mode == E_MAIL_FORMATTER_MODE_PRINTING) {
@@ -320,12 +318,17 @@ emfe_text_html_format (EMailFormatterExtension *extension,
                        "formatter_charset", G_TYPE_STRING, charset,
                        NULL);
 
+               /* HTML messages expect white background and black color for text.
+                  If Evolution uses a dark theme, then the dark background with
+                  a black text is hard to read, thus force white background color.
+                  The HTML content can still overwrite both colors.
+               */
                str = g_strdup_printf (
                        "<div class=\"part-container-nostyle\">"
                        "<iframe width=\"100%%\" height=\"10\" "
                        " frameborder=\"0\" src=\"%s\" "
                        " id=\"%s.iframe\" name=\"%s\" "
-                       " style=\"border: 1px solid #%06x; background-color: #%06x;\">"
+                       " style=\"border: 1px solid #%06x; background-color: #ffffff;\">"
                        "</iframe>"
                        "</div>",
                        uri,
@@ -333,10 +336,7 @@ emfe_text_html_format (EMailFormatterExtension *extension,
                        part->id,
                        e_rgba_to_value (
                                e_mail_formatter_get_color (
-                                       formatter, E_MAIL_FORMATTER_COLOR_FRAME)),
-                       e_rgba_to_value (
-                               e_mail_formatter_get_color (
-                                       formatter, E_MAIL_FORMATTER_COLOR_CONTENT)));
+                                       formatter, E_MAIL_FORMATTER_COLOR_FRAME)));
 
                camel_stream_write_string (stream, str, cancellable, NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]