Merge pull request #568 from ggrtk/qt-theme

Qt: Reset palette and style when selecting default theme
This commit is contained in:
Connor McLaughlin 2020-06-25 12:13:21 +10:00 committed by GitHub
commit f1cfe1b954
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -672,6 +672,12 @@ void MainWindow::updateTheme()
}
else
{
qApp->setPalette(QApplication::style()->standardPalette());
QStringList available_styles = QStyleFactory::keys();
if (!available_styles.empty())
qApp->setStyle(QStyleFactory::create(available_styles.first()));
qApp->setStyleSheet(QString());
}