feat: auto dark reader mode for Windows
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run

This commit is contained in:
atauzki 2024-11-23 11:47:19 +08:00 committed by GitHub
parent 5406b3022a
commit 1fb1c5c9de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -161,7 +161,10 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, QString const &
#if QT_VERSION >= QT_VERSION_CHECK( 6, 5, 0 ) #if QT_VERSION >= QT_VERSION_CHECK( 6, 5, 0 )
if ( GlobalBroadcaster::instance()->getPreference()->darkReaderMode == Config::Dark::Auto 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; darkReaderModeEnabled = true;
} }
#endif #endif