From 3a93f8b9595100428ed9e571a5b59f6cee85e6e0 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Mon, 20 Mar 2023 00:44:28 -0400 Subject: [PATCH] Revert "fix: white flash when WebEngine page is loading in dark reader mode" This reverts commit f7d6328f40bdaf3a0d952387d9be1a75e2b649e3. --- article-style-st-babylon.css | 15 +++++++++++++ article-style-st-lingvo.css | 15 +++++++++++++ article-style-st-modern.css | 7 ++++++ article_maker.cc | 13 +++++------- articlewebview.cc | 21 ++++++++---------- articlewebview.hh | 3 ++- src/ui/articleview.cpp | 41 +++++------------------------------- 7 files changed, 58 insertions(+), 57 deletions(-) diff --git a/article-style-st-babylon.css b/article-style-st-babylon.css index c43261fa..b09425f6 100644 --- a/article-style-st-babylon.css +++ b/article-style-st-babylon.css @@ -1,3 +1,18 @@ +html +{ + background-color: white; +} + +body +{ + background: white; +} + +.gdarticle +{ + background: white; +} + h3 { font-size: 1em; } diff --git a/article-style-st-lingvo.css b/article-style-st-lingvo.css index 6171d831..20974124 100644 --- a/article-style-st-lingvo.css +++ b/article-style-st-lingvo.css @@ -1,3 +1,13 @@ +html +{ + background-color: white; +} + +body +{ + background: white; +} + a { text-decoration: none; @@ -9,6 +19,11 @@ a:hover text-decoration: underline; } +.gdarticle +{ + background: white; +} + /* The 'From ' string which preceeds dictionary name in the heading */ .gdfromprefix { diff --git a/article-style-st-modern.css b/article-style-st-modern.css index 207b7b25..b1f48a73 100644 --- a/article-style-st-modern.css +++ b/article-style-st-modern.css @@ -1,9 +1,15 @@ +html +{ + background-color: white; +} + body { margin-top: 1px; margin-right: 3px; margin-left: 2px; margin-bottom: 3px; + background: white; } a @@ -24,6 +30,7 @@ a:hover padding: 5px; border: 1px solid #d0dde2; border-radius: 8px; + background: white; } .gdactivearticle diff --git a/article_maker.cc b/article_maker.cc index fc5e13be..7bf1a986 100644 --- a/article_maker.cc +++ b/article_maker.cc @@ -51,11 +51,6 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, "" ""; - // background is #242525 because Darkreader will invert pure white to this value - if( GlobalBroadcaster::instance()->getPreference()->darkReaderMode ){ - result += R"()"; - } - // add jquery { result += " - +