mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 16:04:06 +00:00
feat: Windows, use Fusion only when dark mode applied
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
1fa0771716
commit
2d6e2a85ee
|
@ -368,7 +368,7 @@ int main( int argc, char ** argv )
|
|||
|
||||
#ifdef Q_OS_WIN
|
||||
// TODO: Force fusion because Qt6.7's "ModernStyle"'s dark theme have problems, need to test / reconsider in future
|
||||
QHotkeyApplication::setStyle( QStyleFactory::create( "Fusion" ) );
|
||||
QHotkeyApplication::setStyle( QStyleFactory::create( "WindowsVista" ) );
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1356,8 +1356,10 @@ void MainWindow::updateAppearances( QString const & addonStyle,
|
|||
darkPalette.setColor( QPalette::Disabled, QPalette::HighlightedText, disabledColor );
|
||||
|
||||
qApp->setPalette( darkPalette );
|
||||
qApp->setStyle( "Fusion" );
|
||||
}
|
||||
else {
|
||||
qApp->setStyle( "WindowsVista" );
|
||||
qApp->setPalette( QPalette() );
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue