I#1522 - WebView: Enable light/dark color scheme for the preview panels
Works only with WebkitGTK with this change included: https://bugs.webkit.org/show_bug.cgi?id=208204 Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1522
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
:root {
|
||||
color-scheme: light dark; /* both supported */
|
||||
}
|
||||
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
:root {
|
||||
color-scheme: light dark; /* both supported */
|
||||
}
|
||||
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
|
||||
#define HTML_HEADER "<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<html>\n" \
|
||||
"<head>\n<meta name=\"generator\" content=\"Evolution Addressbook Component\">\n" \
|
||||
"<meta name=\"color-scheme\" content=\"light dark\">\n" \
|
||||
"<link type=\"text/css\" rel=\"stylesheet\" href=\"evo-file://$EVOLUTION_WEBKITDATADIR/webview.css\">" \
|
||||
"<style type=\"text/css\">\n" \
|
||||
" div#header { width:100%; clear: both; }\n" \
|
||||
|
||||
@ -61,6 +61,7 @@ struct _ECalComponentPreviewPrivate {
|
||||
|
||||
#define HTML_HEADER "<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<html>\n" \
|
||||
"<head>\n<meta name=\"generator\" content=\"Evolution Calendar Component\">\n" \
|
||||
"<meta name=\"color-scheme\" content=\"light dark\">\n" \
|
||||
"<link type=\"text/css\" rel=\"stylesheet\" href=\"evo-file://$EVOLUTION_WEBKITDATADIR/webview.css\">\n" \
|
||||
"<style>\n" \
|
||||
".description { font-family: monospace; font-size: 1em; }\n" \
|
||||
|
||||
@ -1976,8 +1976,8 @@ web_view_submit_alert (EAlertSink *alert_sink,
|
||||
buffer,
|
||||
"<html>"
|
||||
"<head>"
|
||||
"<meta http-equiv=\"content-type\""
|
||||
" content=\"text/html; charset=utf-8\">"
|
||||
"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">"
|
||||
"<meta name=\"color-scheme\" content=\"light dark\">"
|
||||
"</head>"
|
||||
"<body>");
|
||||
|
||||
@ -2625,7 +2625,9 @@ e_web_view_clear (EWebView *web_view)
|
||||
|
||||
e_web_view_load_string (web_view,
|
||||
"<html>"
|
||||
"<head></head>"
|
||||
"<head>"
|
||||
"<meta name=\"color-scheme\" content=\"light dark\">"
|
||||
"</head>"
|
||||
"<body class=\"-e-web-view-background-color -e-web-view-text-color\"></body>"
|
||||
"</html>");
|
||||
}
|
||||
|
||||
@ -117,6 +117,7 @@ mail_formatter_print_run (EMailFormatter *formatter,
|
||||
"<html>\n"
|
||||
"<head>\n"
|
||||
"<meta name=\"generator\" content=\"Evolution Mail\" />\n"
|
||||
"<meta name=\"color-scheme\" content=\"light dark\">\n"
|
||||
"<title>Evolution Mail Display</title>\n"
|
||||
"<link type=\"text/css\" rel=\"stylesheet\" media=\"print\" href=\"" STYLESHEET_URI "\"/>\n"
|
||||
"</head>\n"
|
||||
|
||||
@ -1140,6 +1140,7 @@ e_mail_formatter_get_sub_html_header (EMailFormatter *formatter)
|
||||
"<html>\n"
|
||||
"<head>\n"
|
||||
"<meta name=\"generator\" content=\"Evolution Mail\"/>\n"
|
||||
"<meta name=\"color-scheme\" content=\"light dark\">\n"
|
||||
"<title>Evolution Mail Display</title>\n"
|
||||
"<link type=\"text/css\" rel=\"stylesheet\" "
|
||||
" href=\"" STYLESHEET_URI "\"/>\n"
|
||||
@ -1158,6 +1159,7 @@ e_mail_formatter_get_html_header (EMailFormatter *formatter)
|
||||
"<html>\n"
|
||||
"<head>\n"
|
||||
"<meta name=\"generator\" content=\"Evolution Mail\"/>\n"
|
||||
"<meta name=\"color-scheme\" content=\"light dark\">\n"
|
||||
"<title>Evolution Mail Display</title>\n"
|
||||
"<link type=\"text/css\" rel=\"stylesheet\" "
|
||||
" href=\"" STYLESHEET_URI "\"/>\n"
|
||||
|
||||
@ -2874,6 +2874,7 @@ e_mail_display_set_status (EMailDisplay *display,
|
||||
"<html>\n"
|
||||
"<head>\n"
|
||||
"<meta name=\"generator\" content=\"Evolution Mail\"/>\n"
|
||||
"<meta name=\"color-scheme\" content=\"light dark\">\n"
|
||||
"<title>Evolution Mail Display</title>\n"
|
||||
"</head>\n"
|
||||
"<body class=\"-e-web-view-background-color e-web-view-text-color\">"
|
||||
|
||||
Reference in New Issue
Block a user