[evolution/wip/mcrha/webkit-jsc-api: 290/292]	webkit_editor_style_updated_cb: Correct handling of theme	colors (and the CSS)
- From: Milan Crha <mcrha src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [evolution/wip/mcrha/webkit-jsc-api: 290/292]	webkit_editor_style_updated_cb: Correct handling of theme	colors (and the CSS)
 
- Date: Wed, 11 Mar 2020 16:07:13 +0000 (UTC)
 
commit 7305bbf98e1390f072a05787601b25fc79e2a1cc
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 10 15:14:12 2020 +0100
    webkit_editor_style_updated_cb: Correct handling of theme colors (and the CSS)
 src/modules/webkit-editor/e-webkit-editor.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/modules/webkit-editor/e-webkit-editor.c b/src/modules/webkit-editor/e-webkit-editor.c
index f5fe2a61d3..d78bc933b3 100644
--- a/src/modules/webkit-editor/e-webkit-editor.c
+++ b/src/modules/webkit-editor/e-webkit-editor.c
@@ -1887,6 +1887,11 @@ webkit_editor_style_updated_cb (EWebKitEditor *wk_editor)
            gdk_rgba_equal (&vlink_color, &wk_editor->priv->theme_vlink_color))
                return;
 
+       wk_editor->priv->theme_bgcolor = bgcolor;
+       wk_editor->priv->theme_fgcolor = fgcolor;
+       wk_editor->priv->theme_link_color = link_color;
+       wk_editor->priv->theme_vlink_color = vlink_color;
+
        css = g_string_sized_new (160);
        script = g_string_sized_new (256);
 
@@ -1898,7 +1903,7 @@ webkit_editor_style_updated_cb (EWebKitEditor *wk_editor)
        webkit_editor_add_color_style (css, "html", "background-color", &bgcolor);
        webkit_editor_add_color_style (css, "html", "color", &fgcolor);
        webkit_editor_add_color_style (css, "a", "color", &link_color);
-       webkit_editor_add_color_style (css, "html", "a:visited", &vlink_color);
+       webkit_editor_add_color_style (css, "a:visited", "color", &vlink_color);
 
        e_web_view_jsc_printf_script_gstring (script,
                "EvoEditor.UpdateThemeStyleSheet(%s);",
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]