[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kdeui
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2004-08-28 10:26:03
Message-ID: 20040828102603.B61952A06 () office ! kde ! org
[Download RAW message or body]
CVS commit by dhaumann:
fix 2px resize bug, which made the bottom and right tabs move by 2px when
activated/deactivated.
M +6 -5 kdockwidget_private.cpp 1.48
--- kdelibs/kdeui/kdockwidget_private.cpp #1.47:1.48
@@ -25,4 +25,5 @@
#include <kdebug.h>
#include <qtimer.h>
+#include <math.h>
KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orient, \
int pos, bool highResolution) @@ -224,5 +225,5 @@ void \
KDockSplitter::resizeEvent(QResizeE // ", "<<(isVisible() ?"visible":"")<<endl;
if (initialised){
- int factor = (mHighResolution)? 10000:100;
+ double factor = (mHighResolution)? 10000.0:100.0;
// real resize event, recalculate xpos
if (ev && mKeepSize && isVisible()) {
@@ -247,8 +248,8 @@ void KDockSplitter::resizeEvent(QResizeE
{
if (fixedHeight0!=-1)
- xpos=fixedHeight0*factor/height();
+ xpos=floor(fixedHeight0*factor/height());
else
if (fixedHeight1!=-1)
- xpos=(height()-fixedHeight1)*factor/height();
+ xpos=ceil((height()-fixedHeight1)*factor/height());
}
}
@@ -258,8 +259,8 @@ void KDockSplitter::resizeEvent(QResizeE
{
if (fixedWidth0!=-1)
- xpos=fixedWidth0*factor/width();
+ xpos=floor(fixedWidth0*factor/width());
else
if (fixedWidth1!=-1)
- xpos=(width()-fixedWidth1)*factor/width();
+ xpos=ceil((width()-fixedWidth1)*factor/width());
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic