diff options
author | Дилян Палаузов <git-dpa@aegee.org> | 2023-04-16 09:19:57 +0200 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2023-04-18 10:30:28 +0000 |
commit | 1885854264e2a94ab3db48c3afb19cb5f78c794d (patch) | |
tree | 9aaf0c8504d972ce5ba35f6fbdb3d37eeec6e8f2 | |
parent | 6e1c62cb90c75bf048e16680b4ad6438fa2cafeb (diff) | |
download | evolution-1885854264e2a94ab3db48c3afb19cb5f78c794d.tar.gz |
M!118 - iTIP-formatter: respect the color-scheme in HTML MIME parts
Related to https://gitlab.gnome.org/GNOME/evolution/-/issues/2275
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/2284
Closes https://gitlab.gnome.org/GNOME/evolution/-/merge_requests/118
-rw-r--r-- | data/webkit/e-web-view.js | 15 | ||||
-rw-r--r-- | src/em-format/e-mail-formatter-text-html.c | 2 | ||||
-rw-r--r-- | src/modules/itip-formatter/itip-view.c | 2 |
3 files changed, 2 insertions, 17 deletions
diff --git a/data/webkit/e-web-view.js b/data/webkit/e-web-view.js index 2752c7b839..e5d01629b4 100644 --- a/data/webkit/e-web-view.js +++ b/data/webkit/e-web-view.js @@ -695,21 +695,6 @@ Evo.initialize = function(elem) if (doc.defaultView && !doc.defaultView.frameElement && !doc.body.hasAttribute("class")) doc.body.className = "-e-web-view-background-color -e-web-view-text-color"; - - if (doc.documentElement.style.getPropertyValue("color") == "" || - doc.documentElement.style.getPropertyValue("color") == "text") { - if (doc.defaultView && doc.defaultView.frameElement && !doc.defaultView.frameElement.hasAttribute("x-e-unset-colors") && - doc.defaultView.frameElement.ownerDocument && - doc.defaultView.frameElement.ownerDocument.defaultView && - doc.defaultView.frameElement.ownerDocument.defaultView.window) { - var style = doc.defaultView.frameElement.ownerDocument.defaultView.window.getComputedStyle(doc.defaultView.frameElement); - if (style) { - doc.documentElement.style.setProperty("color", style.color); - doc.documentElement.style.setProperty("background-color", style.backgroundColor); - } - } - } - elems = doc.querySelectorAll("input, textarea, select, button, label"); for (ii = 0; ii < elems.length; ii++) { diff --git a/src/em-format/e-mail-formatter-text-html.c b/src/em-format/e-mail-formatter-text-html.c index 8a938212ff..777254eaca 100644 --- a/src/em-format/e-mail-formatter-text-html.c +++ b/src/em-format/e-mail-formatter-text-html.c @@ -369,7 +369,7 @@ emfe_text_html_format (EMailFormatterExtension *extension, e_mail_part_get_id (part), e_mail_part_get_id (part), e_mail_part_get_frame_security_style (part), - g_settings_get_boolean (settings, "preview-unset-html-colors") ? "x-e-unset-colors=\"1\"" : "style=\"background-color:white; color:black;\""); + g_settings_get_boolean (settings, "preview-unset-html-colors") ? "x-e-unset-colors=\"1\"" : "style=\"background-color: #fff; color-scheme: light\""); g_output_stream_write_all ( stream, str, strlen (str), diff --git a/src/modules/itip-formatter/itip-view.c b/src/modules/itip-formatter/itip-view.c index d77ab891b9..ee13f493d3 100644 --- a/src/modules/itip-formatter/itip-view.c +++ b/src/modules/itip-formatter/itip-view.c @@ -2163,7 +2163,7 @@ itip_view_write (gpointer itip_part_ptr, uri, e_mail_part_get_id (part), e_mail_part_get_id (part), - g_settings_get_boolean (settings, "preview-unset-html-colors") ? "x-e-unset-colors=\"1\"" : "style=\"background-color: #ffffff; color:#000000;\""); + g_settings_get_boolean (settings, "preview-unset-html-colors") ? "x-e-unset-colors=\"1\"" : "style=\"background-color: #fff; color-scheme: light\""); g_clear_object (&settings); g_free (uri); |