diff options
author | TheLastRar <TheLastRar@users.noreply.github.com> | 2022-12-12 20:20:17 +0000 |
---|---|---|
committer | TheLastRar <TheLastRar@users.noreply.github.com> | 2022-12-12 20:22:08 +0000 |
commit | 7e96077ed76d562d8b3c4988c67cfb97a111e879 (patch) | |
tree | 6572b419e4cd30a046d78bb78becc44ba522c3e6 /launcher/ui/themes/ITheme.cpp | |
parent | 15084c8d6d29b799506e4747b1223a6d4eca53eb (diff) | |
download | PrismLauncher-7e96077ed76d562d8b3c4988c67cfb97a111e879.tar.gz PrismLauncher-7e96077ed76d562d8b3c4988c67cfb97a111e879.tar.bz2 PrismLauncher-7e96077ed76d562d8b3c4988c67cfb97a111e879.zip |
Fix: Reset stylesheet before setting style
Resolves #510
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/themes/ITheme.cpp')
-rw-r--r-- | launcher/ui/themes/ITheme.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/launcher/ui/themes/ITheme.cpp b/launcher/ui/themes/ITheme.cpp index 7247b444..8bfc466d 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()); } |