From 22bd89da0810972da3f9b40080905dc4057d17ec Mon Sep 17 00:00:00 2001 From: Beat Wolf Date: Sun, 14 Dec 2008 17:57:50 +0000 Subject: [PATCH] fixed jumpy resizing when resize starts svn path=/trunk/KDE/kdelibs/; revision=896906 --- private/applethandle.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/private/applethandle.cpp b/private/applethandle.cpp index 4b445b038..7975169c6 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -676,10 +676,11 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) newScaleHeight += y; if (qAbs(event->pos().x() - pressPos.x()) <= KGlobalSettings::dndEventDelay()) { - newScaleWidth = m_originalSize.width() / originalRect.width(); + newScaleWidth = 1.0 + m_originalSize.width() / originalRect.width(); } + if (qAbs(event->pos().y() - pressPos.y()) <= KGlobalSettings::dndEventDelay()) { - newScaleHeight = m_originalSize.height() / originalRect.height(); + newScaleHeight = 1.0 + m_originalSize.height() / originalRect.height(); } if (newScaleHeight * h < min.height()) { @@ -710,7 +711,7 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) newScale += (x + y) / 2; //divide by two to have slower resizing if (qAbs(event->pos().y() - pressPos.y()) <= KGlobalSettings::dndEventDelay()) { - newScale = m_originalSize.height() / originalRect.height(); + newScale = 1.0 + m_originalSize.height() / originalRect.height(); } if (newScale * w < min.width() || newScale * h < min.height()) {