summaryrefslogtreecommitdiffstats
path: root/application/themes/ITheme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'application/themes/ITheme.cpp')
-rw-r--r--application/themes/ITheme.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/application/themes/ITheme.cpp b/application/themes/ITheme.cpp
index aefcc381..b1cecf57 100644
--- a/application/themes/ITheme.cpp
+++ b/application/themes/ITheme.cpp
@@ -1,5 +1,26 @@
#include "ITheme.h"
#include "rainbow.h"
+#include <QStyleFactory>
+#include <QDir>
+#include "MultiMC.h"
+
+void ITheme::apply(bool)
+{
+ QApplication::setStyle(QStyleFactory::create(qtTheme()));
+ if(hasColorScheme())
+ {
+ QApplication::setPalette(colorScheme());
+ }
+ if(hasStyleSheet())
+ {
+ MMC->setStyleSheet(appStyleSheet());
+ }
+ else
+ {
+ MMC->setStyleSheet(QString());
+ }
+ QDir::setSearchPaths("theme", searchPaths());
+}
QPalette ITheme::fadeInactive(QPalette in, qreal bias, QColor color)
{