aboutsummaryrefslogtreecommitdiff
path: root/application/themes/ITheme.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2021-07-25 19:11:59 +0200
committerPetr Mrázek <peterix@gmail.com>2021-07-25 19:50:44 +0200
commit20b9f2b42a3b58b6081af271774fbcc34025dccb (patch)
tree064fa59facb3357139b47bd4e60bfc8edb35ca11 /application/themes/ITheme.cpp
parentdd133680858351e3e07690e286882327a4f42ba5 (diff)
downloadPrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.tar.gz
PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.tar.bz2
PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.zip
NOISSUE Flatten gui and logic libraries into MultiMC
Diffstat (limited to 'application/themes/ITheme.cpp')
-rw-r--r--application/themes/ITheme.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/application/themes/ITheme.cpp b/application/themes/ITheme.cpp
deleted file mode 100644
index bfec87e7..00000000
--- a/application/themes/ITheme.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#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)
-{
- auto blend = [&in, bias, color](QPalette::ColorRole role)
- {
- QColor from = in.color(QPalette::Active, role);
- QColor blended = Rainbow::mix(from, color, bias);
- in.setColor(QPalette::Disabled, role, blended);
- };
- blend(QPalette::Window);
- blend(QPalette::WindowText);
- blend(QPalette::Base);
- blend(QPalette::AlternateBase);
- blend(QPalette::ToolTipBase);
- blend(QPalette::ToolTipText);
- blend(QPalette::Text);
- blend(QPalette::Button);
- blend(QPalette::ButtonText);
- blend(QPalette::BrightText);
- blend(QPalette::Link);
- blend(QPalette::Highlight);
- blend(QPalette::HighlightedText);
- return in;
-}