aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-09-13 16:05:22 -0400
committerKen Moore <ken@ixsystems.com>2017-09-13 16:05:22 -0400
commitd1e63d3b0982f5de681c553b706ea0a1a6c7b3ad (patch)
treef0db1d6c1472ac4254fd991a604f9fdac9a632eb /src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin
parentFix up some of the qss theme page (diff)
downloadlumina-d1e63d3b0982f5de681c553b706ea0a1a6c7b3ad.tar.gz
lumina-d1e63d3b0982f5de681c553b706ea0a1a6c7b3ad.tar.bz2
lumina-d1e63d3b0982f5de681c553b706ea0a1a6c7b3ad.zip
Fix up a bunch more of the lumina-theme-engine functionality - adding in all the desktop style settings and reworking the configuration UI and functionality.
Diffstat (limited to 'src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin')
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp14
1 files changed, 8 insertions, 6 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 692223c7..9cb755fb 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
@@ -131,9 +131,9 @@ void lthemeenginePlatformTheme::applySettings(){
else{ qApp->setPalette(qApp->style()->standardPalette()); }
}
//do not override application style
- if(m_prevStyleSheet == qApp->styleSheet()){ qApp->setStyleSheet(m_userStyleSheet); }
- else{ qCDebug(llthemeengine) << "custom style sheet is disabled";}
- m_prevStyleSheet = m_userStyleSheet;
+ qApp->setStyleSheet(m_userStyleSheet);
+ //else{ qCDebug(llthemeengine) << "custom style sheet is disabled";}
+ //m_prevStyleSheet = m_userStyleSheet;
}
#endif
QGuiApplication::setFont(m_generalFont); //apply font
@@ -156,13 +156,13 @@ void lthemeenginePlatformTheme::createFSWatcher(){
watcher->addPath(lthemeengine::configPath());
QTimer *timer = new QTimer(this);
timer->setSingleShot(true);
- timer->setInterval(3000);
+ timer->setInterval(500);
connect(watcher, SIGNAL(directoryChanged(QString)), timer, SLOT(start()));
connect(timer, SIGNAL(timeout()), SLOT(updateSettings()));
}
void lthemeenginePlatformTheme::updateSettings(){
- qCDebug(llthemeengine) << "updating settings..";
+ //qCDebug(llthemeengine) << "updating settings..";
readSettings();
applySettings();
}
@@ -212,8 +212,9 @@ void lthemeenginePlatformTheme::readSettings(){
//load style sheets
#ifdef QT_WIDGETS_LIB
QStringList qssPaths;
- if(qApp->applicationName()=="lumina-desktop"){ qssPaths << settings.value("desktop_stylesheets").toStringList(); }
+ if(qApp->applicationFilePath().section("/",-1).startsWith("lumina-desktop") ){ qssPaths << settings.value("desktop_stylesheets").toStringList(); }
qssPaths << settings.value("stylesheets").toStringList();
+ //qDebug() << "Loaded Stylesheets:" << qApp->applicationName() << qssPaths;
m_userStyleSheet = loadStyleSheets(qssPaths);
#endif
settings.endGroup();
@@ -226,6 +227,7 @@ bool lthemeenginePlatformTheme::hasWidgets(){
#endif
QString lthemeenginePlatformTheme::loadStyleSheets(const QStringList &paths){
+ //qDebug() << "Loading Stylesheets:" << paths;
QString content;
foreach (QString path, paths){
if(!QFile::exists(path)){ continue; }
bgstack15