set the target widget, and reverse the flow of the animation (temporary workaround for 4.5 release)

svn path=/trunk/KDE/kdelibs/; revision=1148348
This commit is contained in:
Aaron J. Seigo 2010-07-10 10:49:34 +00:00
parent c79a1fb1f1
commit 836e012dd4

View File

@ -985,6 +985,10 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
Plasma::Animation *anim = Plasma::Animator::create(Plasma::Animator::AppearAnimation);
if (anim) {
connect(anim, SIGNAL(finished()), this, SLOT(appletAppearAnimationComplete()));
anim->setTargetWidget(applet);
//FIXME: small hack until we have proper js anim support; allows 'zoom' to work in the
//'right' direction for appearance
anim->setDirection(QAbstractAnimation::Backward);
anim->start(QAbstractAnimation::DeleteWhenStopped);
} else {
d->appletAppeared(applet);