diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-07-25 19:11:59 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-07-25 19:50:44 +0200 |
commit | 20b9f2b42a3b58b6081af271774fbcc34025dccb (patch) | |
tree | 064fa59facb3357139b47bd4e60bfc8edb35ca11 /application/themes/SystemTheme.cpp | |
parent | dd133680858351e3e07690e286882327a4f42ba5 (diff) | |
download | PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.tar.gz PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.tar.bz2 PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.zip |
NOISSUE Flatten gui and logic libraries into MultiMC
Diffstat (limited to 'application/themes/SystemTheme.cpp')
-rw-r--r-- | application/themes/SystemTheme.cpp | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/application/themes/SystemTheme.cpp b/application/themes/SystemTheme.cpp deleted file mode 100644 index 49b1afaa..00000000 --- a/application/themes/SystemTheme.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include "SystemTheme.h" -#include <QApplication> -#include <QStyle> -#include <QStyleFactory> -#include <QDebug> - -SystemTheme::SystemTheme() -{ - qDebug() << "Determining System Theme..."; - const auto & style = QApplication::style(); - systemPalette = style->standardPalette(); - QString lowerThemeName = style->objectName(); - qDebug() << "System theme seems to be:" << lowerThemeName; - QStringList styles = QStyleFactory::keys(); - for(auto &st: styles) - { - qDebug() << "Considering theme from theme factory:" << st.toLower(); - if(st.toLower() == lowerThemeName) - { - systemTheme = st; - qDebug() << "System theme has been determined to be:" << systemTheme; - return; - } - } - // fall back to fusion if we can't find the current theme. - systemTheme = "Fusion"; - qDebug() << "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"; -} - -QString SystemTheme::name() -{ - return QObject::tr("System"); -} - -QString SystemTheme::qtTheme() -{ - return systemTheme; -} - -QPalette SystemTheme::colorScheme() -{ - return systemPalette; -} - -QString SystemTheme::appStyleSheet() -{ - return QString(); -} - -double SystemTheme::fadeAmount() -{ - return 0.5; -} - -QColor SystemTheme::fadeColor() -{ - return QColor(128,128,128); -} - -bool SystemTheme::hasStyleSheet() -{ - return false; -} - -bool SystemTheme::hasColorScheme() -{ - return true; -} |