mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 16:04:06 +00:00
feat: auto dark reader mode for Windows
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
This commit is contained in:
parent
5406b3022a
commit
1fb1c5c9de
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue