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 /calendar | |
parent | b3fb5dfc8128fd903e702beeb96eae33de8aa993 (diff) | |
download | gsoc2013-evolution-68f27ce0c8a3ed44d1f1105970cc68326df6bad3.tar.gz 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 'calendar')
-rw-r--r-- | calendar/gui/e-cal-component-preview.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index ffaba3f84b..c96e0641a2 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -205,8 +205,6 @@ cal_component_preview_write_html (ECalComponentPreview *preview, icalproperty_status status; const gchar *location; gint *priority_value; - GtkStyle *style; - GtkStateType state; client = preview->priv->client; comp = preview->priv->comp; @@ -216,14 +214,8 @@ cal_component_preview_write_html (ECalComponentPreview *preview, /* write document header */ e_cal_component_get_summary (comp, &text); - style = gtk_widget_get_style (GTK_WIDGET (preview)); - state = gtk_widget_get_state (GTK_WIDGET (preview)); - g_string_append (buffer, HTML_HEADER); - g_string_append_printf ( - buffer, "<body bgcolor=\"#%06x\" text=\"#%06x\">", - e_color_to_value (&style->base[state]), - e_color_to_value (&style->text[state])); + g_string_append (buffer, "<body class=\"-e-web-view-background-color -e-web-view-text-color\">"); if (text.value) g_string_append_printf (buffer, "<h2>%s</h2>", text.value); |