Merge pull request #600 from TheLastRar/reset-stylesheet

Resolves https://github.com/PrismLauncher/PrismLauncher/issues/510
This commit is contained in:
flow 2022-12-12 13:28:24 -08:00 committed by Sefa Eyeoglu
parent 15084c8d6d
commit 783761ca2e
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

@ -6,19 +6,14 @@
void ITheme::apply(bool) void ITheme::apply(bool)
{ {
APPLICATION->setStyleSheet(QString());
QApplication::setStyle(QStyleFactory::create(qtTheme())); QApplication::setStyle(QStyleFactory::create(qtTheme()));
if(hasColorScheme()) if (hasColorScheme()) {
{
QApplication::setPalette(colorScheme()); QApplication::setPalette(colorScheme());
} }
if(hasStyleSheet()) if (hasStyleSheet())
{
APPLICATION->setStyleSheet(appStyleSheet()); APPLICATION->setStyleSheet(appStyleSheet());
}
else
{
APPLICATION->setStyleSheet(QString());
}
QDir::setSearchPaths("theme", searchPaths()); QDir::setSearchPaths("theme", searchPaths());
} }