From ceb5fc6d755cdcb263edc27386db38de9499048f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 18 Jan 2017 02:45:04 +0100 Subject: GH-1790 do not apply system theme on launch if it is selected This prevents some ugly colors to show up on macOS in most cases. It still looks ugly right after you switch to the it though. --- application/themes/ITheme.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'application/themes/ITheme.cpp') 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 +#include +#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) { -- cgit v1.2.3