aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-theme-engine/src
diff options
context:
space:
mode:
authorOle-André Rodlie <ole.andre.rodlie@gmail.com>2018-04-14 06:04:24 +0200
committerOle-André Rodlie <ole.andre.rodlie@gmail.com>2018-04-14 06:04:24 +0200
commit4d220a52a02825c49068c0c189da5265ae52673f (patch)
tree5aa019e4a8c85ab1089ef2c0c3d7cefabf4cfea0 /src-qt5/core/lumina-theme-engine/src
parentAdd a quick test script I wrote to probe icon themes and see what is found or... (diff)
downloadlumina-4d220a52a02825c49068c0c189da5265ae52673f.tar.gz
lumina-4d220a52a02825c49068c0c189da5265ae52673f.tar.bz2
lumina-4d220a52a02825c49068c0c189da5265ae52673f.zip
lthemeengine: check if dirs ends with "/" in stylesheet/color path, this fixes enabled.contains
Diffstat (limited to 'src-qt5/core/lumina-theme-engine/src')
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp
index cb491aa6..9ffe39f8 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp
@@ -61,7 +61,10 @@ QStringList lthemeengine::sharedStyleSheetPath(){
dirs << QString(getenv("XDG_CONFIG_HOME"));
dirs << QString(getenv("XDG_CONFIG_DIRS")).split(":");
dirs << QString(getenv("XDG_DATA_DIRS")).split(":");
- for(int i=0; i<dirs.length(); i++){ dirs[i].append("/lthemeengine/qss/"); }
+ for(int i=0; i<dirs.length(); i++){
+ if (!dirs[i].endsWith("/")){ dirs[i].append("/"); }
+ dirs[i].append("lthemeengine/qss/");
+ }
if(dirs.isEmpty()){ dirs << LTHEMEENGINE_DATADIR"/lthemeengine/qss/"; } //no XDG settings - use the hardcoded path
return dirs;
}
@@ -75,7 +78,10 @@ QStringList lthemeengine::sharedDesktopStyleSheetPath(){
dirs << QString(getenv("XDG_CONFIG_HOME"));
dirs << QString(getenv("XDG_CONFIG_DIRS")).split(":");
dirs << QString(getenv("XDG_DATA_DIRS")).split(":");
- for(int i=0; i<dirs.length(); i++){ dirs[i].append("/lthemeengine/desktop_qss/"); }
+ for(int i=0; i<dirs.length(); i++){
+ if (!dirs[i].endsWith("/")){ dirs[i].append("/"); }
+ dirs[i].append("lthemeengine/desktop_qss/");
+ }
if(dirs.isEmpty()){ dirs << LTHEMEENGINE_DATADIR"/lthemeengine/desktop_qss/"; } //no XDG settings - use the hardcoded path
return dirs;
}
@@ -89,7 +95,10 @@ QStringList lthemeengine::sharedColorSchemePath(){
dirs << QString(getenv("XDG_CONFIG_HOME"));
dirs << QString(getenv("XDG_CONFIG_DIRS")).split(":");
dirs << QString(getenv("XDG_DATA_DIRS")).split(":");
- for(int i=0; i<dirs.length(); i++){ dirs[i].append("/lthemeengine/colors/"); }
+ for(int i=0; i<dirs.length(); i++){
+ if (!dirs[i].endsWith("/")){ dirs[i].append("/"); }
+ dirs[i].append("lthemeengine/colors/");
+ }
if(dirs.isEmpty()){ dirs << LTHEMEENGINE_DATADIR"/lthemeengine/colors/"; } //no XDG settings - use the hardcoded path
qDebug() << "Got Color Dirs:" << dirs;
return dirs;
bgstack15