diff options
author | Tomas Popela <tpopela@redhat.com> | 2013-09-12 21:29:58 +0800 |
---|---|---|
committer | Tomas Popela <tpopela@redhat.com> | 2013-09-12 21:29:58 +0800 |
commit | 68f27ce0c8a3ed44d1f1105970cc68326df6bad3 (patch) | |
tree | cad3537983c28b85223ebb171301df1d8674f5e0 /em-format/e-mail-formatter-source.c | |
parent | b3fb5dfc8128fd903e702beeb96eae33de8aa993 (diff) | |
download | gsoc2013-evolution-68f27ce0c8a3ed44d1f1105970cc68326df6bad3.tar gsoc2013-evolution-68f27ce0c8a3ed44d1f1105970cc68326df6bad3.tar.gz gsoc2013-evolution-68f27ce0c8a3ed44d1f1105970cc68326df6bad3.tar.bz2 gsoc2013-evolution-68f27ce0c8a3ed44d1f1105970cc68326df6bad3.tar.lz gsoc2013-evolution-68f27ce0c8a3ed44d1f1105970cc68326df6bad3.tar.xz gsoc2013-evolution-68f27ce0c8a3ed44d1f1105970cc68326df6bad3.tar.zst gsoc2013-evolution-68f27ce0c8a3ed44d1f1105970cc68326df6bad3.zip |
Bug #706008 - Workaround gnome-shell style change on focus change
Avoid redrawing (thus loosing the selection and scroll position) of
preview window on style change by defining the colors through CSS styles.
On style change we just update the CSS color definitions and preview will
update itself without redraw.
Diffstat (limited to 'em-format/e-mail-formatter-source.c')
-rw-r--r-- | em-format/e-mail-formatter-source.c | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/em-format/e-mail-formatter-source.c b/em-format/e-mail-formatter-source.c index 944f9a4c14..12eaa4ab7c 100644 --- a/em-format/e-mail-formatter-source.c +++ b/em-format/e-mail-formatter-source.c @@ -70,31 +70,16 @@ emfe_source_format (EMailFormatterExtension *extension, buffer = g_string_new (""); if (CAMEL_IS_MIME_MESSAGE (mime_part)) { - g_string_append_printf ( + g_string_append ( buffer, - "<div class=\"part-container\" " - "style=\"border: 0; background: #%06x; color: #%06x;\" >", - e_rgba_to_value ( - e_mail_formatter_get_color ( - formatter, E_MAIL_FORMATTER_COLOR_BODY)), - e_rgba_to_value ( - e_mail_formatter_get_color ( - formatter, E_MAIL_FORMATTER_COLOR_TEXT))); + "<div class=\"part-container -e-mail-formatter-body-color " + "-e-web-view-text-color\" style=\"border: 0;\" >"); } else { - g_string_append_printf ( + g_string_append ( buffer, - "<div class=\"part-container\" " - "style=\"border-color: #%06x; background: #%06x; color: #%06x;\">" - "<div class=\"part-container-inner-margin pre\">\n", - 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_BODY)), - e_rgba_to_value ( - e_mail_formatter_get_color ( - formatter, E_MAIL_FORMATTER_COLOR_TEXT))); + "<div class=\"part-container -e-mail-formatter-body-color " + " -e-web-view-text-color -e-mail-formatter-frame-color\">" + "<div class=\"part-container-inner-margin pre\">\n"); } camel_stream_write_string ( |