added suggested changes
Signed-off-by: Tayou <tayou@gmx.net>
This commit is contained in:
parent
fef60a9da0
commit
a3f5ea3598
7 changed files with 68 additions and 71 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue