From 783761ca2e6bc00d7025fd296f21f649e9f28f06 Mon Sep 17 00:00:00 2001 From: flow Date: Mon, 12 Dec 2022 13:28:24 -0800 Subject: [PATCH] Merge pull request #600 from TheLastRar/reset-stylesheet Resolves https://github.com/PrismLauncher/PrismLauncher/issues/510 --- launcher/ui/themes/ITheme.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/launcher/ui/themes/ITheme.cpp b/launcher/ui/themes/ITheme.cpp index 7247b444c..8bfc466d2 100644 --- a/launcher/ui/themes/ITheme.cpp +++ b/launcher/ui/themes/ITheme.cpp @@ -6,19 +6,14 @@ void ITheme::apply(bool) { + APPLICATION->setStyleSheet(QString()); QApplication::setStyle(QStyleFactory::create(qtTheme())); - if(hasColorScheme()) - { + if (hasColorScheme()) { QApplication::setPalette(colorScheme()); } - if(hasStyleSheet()) - { + if (hasStyleSheet()) APPLICATION->setStyleSheet(appStyleSheet()); - } - else - { - APPLICATION->setStyleSheet(QString()); - } + QDir::setSearchPaths("theme", searchPaths()); }