From 5ed683ade741fbdf48eca3a89925b4bebb1aa332 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 28 Dec 2015 10:00:57 -0500 Subject: Make sure to round the generated panel size to the nearest pixel rather than save the float to the settings file. --- libLumina/LuminaUtils.cpp | 4 ++-- 1 file 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; -- cgit