aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaUtils.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-12-28 10:00:57 -0500
committerKen Moore <moorekou@gmail.com>2015-12-28 10:00:57 -0500
commit5ed683ade741fbdf48eca3a89925b4bebb1aa332 (patch)
treef3efd1704597734f9cb07816166e310309770b90 /libLumina/LuminaUtils.cpp
parentRemove the "Browse Files" link from the application menu (does not fit well h... (diff)
downloadlumina-5ed683ade741fbdf48eca3a89925b4bebb1aa332.tar.gz
lumina-5ed683ade741fbdf48eca3a89925b4bebb1aa332.tar.bz2
lumina-5ed683ade741fbdf48eca3a89925b4bebb1aa332.zip
Make sure to round the generated panel size to the nearest pixel rather than save the float to the settings file.
Diffstat (limited to 'libLumina/LuminaUtils.cpp')
-rw-r--r--libLumina/LuminaUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index a8ddfc90..5f7a057e 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -655,8 +655,8 @@ void LUtils::LoadSystemDefaults(bool skipOS){
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
+ if(last=="h"){ val = QString::number( qRound(screenGeom.height()*val.toDouble())/100 ); }//adjust value to a percentage of the height of the screen
+ else if(last=="w"){ val = QString::number( qRound(screenGeom.width()*val.toDouble())/100 ); }//adjust value to a percentage of the width of the screen
}
//qDebug() << " -- Adjusted:" << val;
deskset << "height="+val;
bgstack15