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/SystemTheme.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'application/themes/SystemTheme.cpp') diff --git a/application/themes/SystemTheme.cpp b/application/themes/SystemTheme.cpp index 1e0146f7..069b0b1b 100644 --- a/application/themes/SystemTheme.cpp +++ b/application/themes/SystemTheme.cpp @@ -24,6 +24,16 @@ SystemTheme::SystemTheme() qWarning() << "System theme not found, defaulted to Fusion"; } +void SystemTheme::apply(bool initial) +{ + // if we are applying the system theme as the first theme, just don't touch anything. it's for the better... + if(initial) + { + return; + } + ITheme::apply(initial); +} + QString SystemTheme::id() { return "system"; @@ -50,14 +60,14 @@ QString SystemTheme::appStyleSheet() } double SystemTheme::fadeAmount() - { - return 0.5; - } +{ + return 0.5; +} QColor SystemTheme::fadeColor() - { - return QColor(128,128,128); - } +{ + return QColor(128,128,128); +} bool SystemTheme::hasStyleSheet() { @@ -66,10 +76,5 @@ bool SystemTheme::hasStyleSheet() bool SystemTheme::hasColorScheme() { - // FIXME: horrible hack to work around Qt's sketchy theming APIs -#if defined(Q_OS_LINUX) return true; -#else - return false; -#endif } -- cgit v1.2.3