aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-headers.c
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2013-09-12 21:29:58 +0800
committerTomas Popela <tpopela@redhat.com>2013-09-12 21:29:58 +0800
commit68f27ce0c8a3ed44d1f1105970cc68326df6bad3 (patch)
treecad3537983c28b85223ebb171301df1d8674f5e0 /em-format/e-mail-formatter-headers.c
parentb3fb5dfc8128fd903e702beeb96eae33de8aa993 (diff)
downloadgsoc2013-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-headers.c')
-rw-r--r--em-format/e-mail-formatter-headers.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/em-format/e-mail-formatter-headers.c b/em-format/e-mail-formatter-headers.c
index e9f88704c8..3117bec265 100644
--- a/em-format/e-mail-formatter-headers.c
+++ b/em-format/e-mail-formatter-headers.c
@@ -490,9 +490,6 @@ emfe_headers_format (EMailFormatterExtension *extension,
{
CamelMimePart *mime_part;
GString *buffer;
- const GdkRGBA white = { 1.0, 1.0, 1.0, 1.0 };
- const GdkRGBA *body_rgba = &white;
- const GdkRGBA *header_rgba;
const gchar *direction;
gboolean is_collapsable;
gboolean is_collapsed;
@@ -524,22 +521,15 @@ emfe_headers_format (EMailFormatterExtension *extension,
buffer = g_string_new ("");
- if (context->mode != E_MAIL_FORMATTER_MODE_PRINTING)
- body_rgba = e_mail_formatter_get_color (
- formatter, E_MAIL_FORMATTER_COLOR_BODY);
-
- header_rgba = e_mail_formatter_get_color (
- formatter, E_MAIL_FORMATTER_COLOR_HEADER);
-
g_string_append_printf (
buffer,
- "<div class=\"headers\" style=\"background: #%06x;\" id=\"%s\">"
- "<table border=\"0\" width=\"100%%\" "
- "style=\"color: #%06x; direction: %s\">"
+ "%s id=\"%s\"><table class=\"-e-mail-formatter-header-color\" border=\"0\" width=\"100%%\" "
+ "style=\"direction: %s\">"
"<tr>",
- e_rgba_to_value (body_rgba),
+ (context->mode != E_MAIL_FORMATTER_MODE_PRINTING) ?
+ "<div class=\"headers -e-mail-formatter-body-color\"" :
+ "<div class=\"headers\" style=\"background-color: #ffffff;\"",
e_mail_part_get_id (part),
- e_rgba_to_value (header_rgba),
direction);
if (is_collapsable)