aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-08-03 10:48:19 -0400
committerKen Moore <ken@ixsystems.com>2017-08-03 14:04:05 -0400
commit8687a43803e0d5937ff5213ab987b05866498362 (patch)
tree5db21f221f37bb6f8fde8d2f2ffdb782471944cd /src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp
parentMerge branch 'master' of http://github.com/trueos/lumina (diff)
downloadlumina-8687a43803e0d5937ff5213ab987b05866498362.tar.gz
lumina-8687a43803e0d5937ff5213ab987b05866498362.tar.bz2
lumina-8687a43803e0d5937ff5213ab987b05866498362.zip
Cleanup the lumina-theme-engine subproject
1. Use the built-in OS-detect.pri for build settings 2. Remove the "DISABLE_WIDGETS" flag (desktop always needs it) 3. Clean up the multi-path search routines for qss/color files 4. Add some color files to the default install
Diffstat (limited to 'src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp')
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp
index 4d585409..af130ed5 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp
@@ -190,8 +190,7 @@ void AppearancePage::readSettings(){
m_ui->customPaletteButton->setChecked(settings.value("custom_palette", false).toBool());
QString colorSchemePath = settings.value("color_scheme_path").toString();
QDir("/").mkpath(lthemeengine::userColorSchemePath());
- findColorSchemes(lthemeengine::userColorSchemePath());
- findColorSchemes(lthemeengine::sharedColorSchemePath().join(", "));
+ findColorSchemes( QStringList() << lthemeengine::userColorSchemePath() << lthemeengine::sharedColorSchemePath());
if(m_ui->colorSchemeComboBox->count() == 0){
m_customPalette = palette(); //load fallback palette
}
@@ -223,12 +222,15 @@ void AppearancePage::setPalette(QWidget *w, QPalette p){
w->setPalette(p);
}
-void AppearancePage::findColorSchemes(const QString &path){
- QDir dir(path);
- dir.setFilter(QDir::Files);
- dir.setNameFilters(QStringList() << "*.conf");
- foreach (QFileInfo info, dir.entryInfoList()){
- m_ui->colorSchemeComboBox->addItem(info.baseName(), info.filePath());
+void AppearancePage::findColorSchemes(const QStringList &paths){
+ for(int i=0; i<paths.length(); i++){
+ if( !QFile::exists(paths[i])){ continue; }
+ QDir dir(paths[i]);
+ dir.setFilter(QDir::Files);
+ dir.setNameFilters(QStringList() << "*.conf");
+ foreach (QFileInfo info, dir.entryInfoList()){
+ m_ui->colorSchemeComboBox->addItem(info.baseName(), info.filePath());
+ }
}
}
bgstack15