From 1fb1c5c9de615f5432efdad3629743fffbce8e9a Mon Sep 17 00:00:00 2001 From: atauzki Date: Sat, 23 Nov 2024 11:47:19 +0800 Subject: [PATCH] feat: auto dark reader mode for Windows --- src/article_maker.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/article_maker.cc b/src/article_maker.cc index 0e914fcd..9018802d 100644 --- a/src/article_maker.cc +++ b/src/article_maker.cc @@ -161,7 +161,10 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, QString const & #if QT_VERSION >= QT_VERSION_CHECK( 6, 5, 0 ) if ( GlobalBroadcaster::instance()->getPreference()->darkReaderMode == Config::Dark::Auto - && QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark ) { + #if !defined( Q_OS_WINDOWS ) // not properly works on Windows. + && QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark + #endif + && GlobalBroadcaster::instance()->getPreference()->darkMode == Config::Dark::On ) { darkReaderModeEnabled = true; } #endif