diff options
Diffstat (limited to 'application/themes/SystemTheme.cpp')
-rw-r--r-- | application/themes/SystemTheme.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/application/themes/SystemTheme.cpp b/application/themes/SystemTheme.cpp index a9ee853a..00b2300d 100644 --- a/application/themes/SystemTheme.cpp +++ b/application/themes/SystemTheme.cpp @@ -6,75 +6,75 @@ SystemTheme::SystemTheme() { - const auto & style = QApplication::style(); - systemPalette = style->standardPalette(); - QString lowerThemeName = style->objectName(); - qDebug() << systemTheme; - QStringList styles = QStyleFactory::keys(); - for(auto &st: styles) - { - if(st.toLower() == lowerThemeName) - { - systemTheme = st; - return; - } - } - // fall back to fusion if we can't find the current theme. - systemTheme = "Fusion"; - qDebug() << "System theme not found, defaulted to Fusion"; + const auto & style = QApplication::style(); + systemPalette = style->standardPalette(); + QString lowerThemeName = style->objectName(); + qDebug() << systemTheme; + QStringList styles = QStyleFactory::keys(); + for(auto &st: styles) + { + if(st.toLower() == lowerThemeName) + { + systemTheme = st; + 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); + // 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"; + return "system"; } QString SystemTheme::name() { - return QObject::tr("System"); + return QObject::tr("System"); } QString SystemTheme::qtTheme() { - return systemTheme; + return systemTheme; } QPalette SystemTheme::colorScheme() { - return systemPalette; + return systemPalette; } QString SystemTheme::appStyleSheet() { - return QString(); + return QString(); } 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() { - return false; + return false; } bool SystemTheme::hasColorScheme() { - return true; + return true; } |