aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp10
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp
index 545cce9f..934d2234 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp
@@ -132,10 +132,12 @@ void lthemeenginePlatformTheme::applySettings(){
if(m_customPalette){ qApp->setPalette(*m_customPalette); }
else{ qApp->setPalette(qApp->style()->standardPalette()); }
}
- //do not override application style
- qApp->setStyleSheet(m_userStyleSheet);
- //else{ qCDebug(llthemeengine) << "custom style sheet is disabled";}
- //m_prevStyleSheet = m_userStyleSheet;
+ //do not override application style if one is already set by the app itself
+ if(qApp->styleSheet().isEmpty() || qApp->styleSheet()==m_oldStyleSheet){
+ qApp->setStyleSheet(m_userStyleSheet);
+ m_oldStyleSheet = m_userStyleSheet;
+ }
+
}
#endif
QGuiApplication::setFont(m_generalFont); //apply font
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h
index 3bc9ebbf..f521d457 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h
@@ -66,7 +66,7 @@ private:
#endif
QString loadStyleSheets(const QStringList &paths);
QPalette loadColorScheme(QString filePath);
- QString m_style, m_iconTheme, m_userStyleSheet, m_cursorTheme;
+ QString m_style, m_iconTheme, m_userStyleSheet, m_oldStyleSheet, m_cursorTheme;
QPalette *m_customPalette = nullptr;
QFont m_generalFont, m_fixedFont;
int m_doubleClickInterval;
bgstack15