resize now listens to Applet::aspectRatioMode(), reversable with Ctrl

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=759499
This commit is contained in:
Aaron J. Seigo 2008-01-10 19:03:31 +00:00
parent 311f2380ce
commit 12c0a9ae7e

View File

@ -411,7 +411,13 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
min += QSizeF(16, 16);
}
bool ignoreAspectRatio = m_applet->aspectRatioMode() == Qt::IgnoreAspectRatio;
if (QApplication::keyboardModifiers() & Qt::ControlModifier) {
ignoreAspectRatio = !ignoreAspectRatio;
}
if (ignoreAspectRatio) {
// free resizing
qreal newScaleWidth = 0;
qreal newScaleHeight = 0;