summaryrefslogtreecommitdiffstats
path: root/application/MultiMC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'application/MultiMC.cpp')
-rw-r--r--application/MultiMC.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 6c0c4e5e..2f752904 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -355,7 +355,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
connect(this, SIGNAL(aboutToQuit()), SLOT(onExit()));
setIconTheme(settings()->get("IconTheme").toString());
- setApplicationTheme(settings()->get("ApplicationTheme").toString());
+ setApplicationTheme(settings()->get("ApplicationTheme").toString(), true);
initAnalytics();
@@ -868,27 +868,14 @@ void MultiMC::initThemes()
insertTheme(new CustomTheme(darkTheme, "custom"));
}
-void MultiMC::setApplicationTheme(const QString& name)
+void MultiMC::setApplicationTheme(const QString& name, bool initial)
{
auto systemPalette = qApp->palette();
auto themeIter = m_themes.find(name);
if(themeIter != m_themes.end())
{
auto & theme = (*themeIter).second;
- setStyle(QStyleFactory::create(theme->qtTheme()));
- if(theme->hasColorScheme())
- {
- setPalette(theme->colorScheme());
- }
- if(theme->hasStyleSheet())
- {
- setStyleSheet(theme->appStyleSheet());
- }
- else
- {
- setStyleSheet(QString());
- }
- QDir::setSearchPaths("theme", theme->searchPaths());
+ theme->apply(initial);
}
else
{