[Panel-devel] Phase/Animator issues

Aaron J. Seigo aseigo at kde.org
Fri Jul 27 18:29:18 CEST 2007


On Friday 27 July 2007, Ivan Čukić wrote:
> If I call the moveItem to slightly move (SlideIn) the active icon in my
> plasmoid, and the item is deactivated before the animation finishes - which
> invokes the event to move back the icon (SlideOut) the icon will not return
> to the starting place. It will stop at the InterruptedPosition -
> SlideVector, which is not the starting position since the
> InterruptedPosition is not OriginalPosition + SlideVector, but
> OriginalPosition + SlideVector * t, where t < 1.

the implemention of this anim is a bit naive (and i don't take responsibility 
for that, either ;). i'll rewrite it so that it is smarter.

> If I call the (icon is an instance of Plasma::Icon)
> Plasma::Phase::self()->animateItem(icon, Plasma::Phase::Disappear);
> it animates the disappearing, but when the animation finishes, the icon
> comes back. And I don't know the way to be notified when the animation is
> finished to call the icon->setVisible(false).

i just added the animationComplete signal back in on animation completion. i'm 
not happy with it in the sence that it's a broadcasted signal requiring you 
to pay attention to everyone else's finished signals too .... but we'll see 
if that's a realy problem as we go. i believe this may be why i removed it in 
the first place ;)

the alternative may be to provide a callback associated with the animation 
instead so that the "signals" are more targetted. we'll see.

another option is that on completion, Disappear could simply call "hide" on 
your item. hm.. that sounds like a good idea, even. let's see if that doesn't 
break things horribly.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070727/e25b100a/attachment.pgp 


More information about the Panel-devel mailing list