diff options
author | Milan Crha <mcrha@redhat.com> | 2013-05-03 17:04:07 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-05-03 17:04:07 +0800 |
commit | 83ef084bafcbd6e240e09873000d2382522e731b (patch) | |
tree | c359c1d3f08e4410921683f31c1968c39a818d93 | |
parent | 01426717af72345885d19f0a256db0a157b93ce9 (diff) | |
download | gsoc2013-evolution-83ef084bafcbd6e240e09873000d2382522e731b.tar gsoc2013-evolution-83ef084bafcbd6e240e09873000d2382522e731b.tar.gz gsoc2013-evolution-83ef084bafcbd6e240e09873000d2382522e731b.tar.bz2 gsoc2013-evolution-83ef084bafcbd6e240e09873000d2382522e731b.tar.lz gsoc2013-evolution-83ef084bafcbd6e240e09873000d2382522e731b.tar.xz gsoc2013-evolution-83ef084bafcbd6e240e09873000d2382522e731b.tar.zst gsoc2013-evolution-83ef084bafcbd6e240e09873000d2382522e731b.zip |
Bug #696531 - Force white background for HTML parts
-rw-r--r-- | 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 8e9a6a6d0e..2cdb952694 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_color_to_value ((GdkColor *) e_mail_formatter_get_color ( - formatter, E_MAIL_FORMATTER_COLOR_FRAME)), - e_color_to_value ((GdkColor *) - 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); |