fixed jumpy resizing when resize starts

svn path=/trunk/KDE/kdelibs/; revision=896906
This commit is contained in:
Beat Wolf 2008-12-14 17:57:50 +00:00
parent 073c56b8de
commit 22bd89da08

View File

@ -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()) {