[evolution/wip/mcrha/webkit-jsc-api] 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] webkit_editor_style_updated_cb: Correct handling of theme colors (and the CSS)
- Date: Tue, 10 Mar 2020 14:12:11 +0000 (UTC)
commit 7b1e40d8be507bdbe25b17fece739600a9634406
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 52aa42afa3..c87f68e16e 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]