aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaUtils.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-19 10:37:01 -0400
committerKen Moore <moorekou@gmail.com>2015-10-19 10:37:01 -0400
commitdfb4e415d86d0310a0a984818017c190e045ddcd (patch)
tree506f8791bda457edf0ea5cfbeba36b8fd7f277b1 /libLumina/LuminaUtils.cpp
parentAdd a scaling rule for the desktop plugin grid size: (diff)
downloadlumina-dfb4e415d86d0310a0a984818017c190e045ddcd.tar.gz
lumina-dfb4e415d86d0310a0a984818017c190e045ddcd.tar.bz2
lumina-dfb4e415d86d0310a0a984818017c190e045ddcd.zip
Fix a luminaDesktop.conf loading bug with regards to panel sizing.
Diffstat (limited to 'libLumina/LuminaUtils.cpp')
-rw-r--r--libLumina/LuminaUtils.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index 4c90c9ef..6172a49b 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -610,8 +610,12 @@ void LUtils::LoadSystemDefaults(bool skipOS){
//Now parse the variable and put the value in the proper file
if(var==(panvar+"_pixelsize")){
//qDebug() << "Panel Size:" << val;
- if(val.endsWith("%h")){ val = QString::number( (screenGeom.height()*val.section("%",0,0).toDouble())/100 ); }//adjust value to a percentage of the height of the screen
- else if(val.endsWith("%w")){ val = QString::number( (screenGeom.width()*val.section("%",0,0).toDouble())/100 ); }//adjust value to a percentage of the width of the screen
+ if(val.contains("%")){
+ QString last = val.section("%",1,1).toLower(); //last character
+ val = val.section("%",0,0);
+ if(last=="h"){ val = QString::number( (screenGeom.height()*val.toDouble())/100 ); }//adjust value to a percentage of the height of the screen
+ else if(last=="w"){ val = QString::number( (screenGeom.width()*val.toDouble())/100 ); }//adjust value to a percentage of the width of the screen
+ }
//qDebug() << " -- Adjusted:" << val;
deskset << "height="+val;
}
bgstack15