added suggested changes

Signed-off-by: Tayou <tayou@gmx.net>
This commit is contained in:
Tayou
2022-11-01 15:41:08 +01:00
parent fef60a9da0
commit a3f5ea3598
7 changed files with 68 additions and 71 deletions

View File

@ -45,25 +45,25 @@
SystemTheme::SystemTheme()
{
themeDebugLog << "Determining System Theme...";
themeDebugLog() << "Determining System Theme...";
const auto & style = QApplication::style();
systemPalette = style->standardPalette();
QString lowerThemeName = style->objectName();
themeDebugLog << "System theme seems to be:" << lowerThemeName;
themeDebugLog() << "System theme seems to be:" << lowerThemeName;
QStringList styles = QStyleFactory::keys();
for(auto &st: styles)
{
themeDebugLog << "Considering theme from theme factory:" << st.toLower();
themeDebugLog() << "Considering theme from theme factory:" << st.toLower();
if(st.toLower() == lowerThemeName)
{
systemTheme = st;
themeDebugLog << "System theme has been determined to be:" << systemTheme;
themeDebugLog() << "System theme has been determined to be:" << systemTheme;
return;
}
}
// fall back to fusion if we can't find the current theme.
systemTheme = "Fusion";
themeDebugLog << "System theme not found, defaulted to Fusion";
themeDebugLog() << "System theme not found, defaulted to Fusion";
}
void SystemTheme::apply(bool initial)