move the geometry to a correct center

svn path=/trunk/KDE/kdelibs/; revision=1053216
This commit is contained in:
Marco Martin 2009-11-23 16:48:18 +00:00
parent 86d3f458b4
commit f97924aee3

View File

@ -763,9 +763,10 @@ bool AppletHandle::sceneEvent(QEvent *event)
scaleFactor = line1.length() / line0.length();
}
QRectF geom = m_applet->geometry();
QPointF oldCenter(geom.center());
geom.setWidth(geom.width()*scaleFactor);
geom.setHeight(geom.height()*scaleFactor);
geom.moveCenter(line1.pointAt(0.5));
geom.moveCenter(oldCenter);
m_applet->setGeometry(geom);
}
return true;