From 788a9a676876d445ac384f296684c5b326a78df5 Mon Sep 17 00:00:00 2001 From: Albert Liu <45282415+ggrtk@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:12:21 -0700 Subject: [PATCH] Qt: Reset palette and style when selecting default theme Fixes palette and style getting stuck when switching to default theme after having used dark fusion theme earlier in the same session. --- src/duckstation-qt/mainwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 631d88016..db81cd70e 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -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()); }