[Panel-devel] Kicker on the Right of the Screen.

Sébastien Laoût slaout at linux62.org
Sun Feb 11 12:28:42 CET 2007


Le samedi 10 février 2007, Aaron J. Seigo a écrit :
> > - I hardly see how this applet could have been done in Javascript. It
> > need special image effects, for instance. Will this be possible in Plasma
> > Javascript widgets?
>
> depends on the image effects. what sort of image effects were you doing?

Mainly for the cover and stars reflexion.

* To do the reflexions, I take the cover image, mirror it and then apply a
  gradient to make it progressively transparent.

  This involves blending the reflexion progressively with the background image
  to make it look real. But this one is a limitation of transparency
  management in Qt3.

* For the hover/clik effects, when hovering a player button, the icon is
  lightened up, when clicking a button, it is darkened (like with mac OS X).

* I'm also ensuring the cover image to be square. Eg, if it is wider than
  tall, I'm converting it to a QImage and add transparent pixels on the top.

I'm making extensive use of KImageEffect for those effects.
Without talking about animations I'm planning for future release (move 
left/right like with iPods, progressive appearance of player controls on 
mouse hover...).

It's somewhat complicated because I use Qt3 & KDE3.
So the reflexion could be done more easily with Qt4 (making it progressively 
transparent instead of blending it progressively with the background image), 
and the "making cover square" could certainly be done without transforming to 
QImage and added transparent pixels by hand...

- But still, what have you planned for such effects in Plasma?
- Can we directly use a lot of QPainter facilities like composition?
- Should/can we use SVG?
- If there is an ImageCore and AnimationCore library for KDE4, will it be made
  available to Plasma applets through Javascript/etc bindings?
- Is it possible to ask KDE settings to "make this image selected (blending
  with blue by default)" or "make this image hovered (lightening up by
  default, but user configurable)".

Eye candy is an important point of KDE4 and Qt4. In fact it's an important 
point for every desktops nowadays. And with my current Javascript knowledges 
I do not see how we can make even the very basic effects. So IMHO, Plasma 
should propose some powerful API to power applets.

Best regards,
Sébastien Laoût.


More information about the Panel-devel mailing list