fix zoom animation: change transform origin point to widget center

svn path=/trunk/KDE/kdelibs/; revision=1059966
This commit is contained in:
Igor Trindade Oliveira 2009-12-07 19:55:22 +00:00
parent b6f4d1a518
commit 22c6f8e31b

View File

@ -53,6 +53,7 @@ void ZoomAnimation::updateState(QAbstractAnimation::State newState, QAbstractAni
}
if (oldState == Stopped && newState == Running) {
w->setTransformOriginPoint(w->size().width()/2, w->size().height()/2);
w->setScale(direction() == Forward ? 1 : m_zoom);
} else if (newState == Stopped) {
w->setScale(direction() == Forward ? m_zoom : 1);