diff options
author | Ken Moore <moorekou@gmail.com> | 2015-10-19 10:37:01 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-10-19 10:37:01 -0400 |
commit | dfb4e415d86d0310a0a984818017c190e045ddcd (patch) | |
tree | 506f8791bda457edf0ea5cfbeba36b8fd7f277b1 /libLumina/LuminaUtils.cpp | |
parent | Add a scaling rule for the desktop plugin grid size: (diff) | |
download | lumina-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.cpp | 8 |
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; } |