[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Support for animated icons (on mouseover)
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-01-17 10:07:13
[Download RAW message or body]

On Thursday 17 January 2002 09:22, Allan Sandfeld Jensen wrote:
> On Wednesday 16 January 2002 15:45, David Faure wrote:
> > The two patches attached provide support for animations on mouseover, as
> > requested by our beloved artist (aka tackat ;)
> >
> > The main question is: given the current feature freeze, is it ok to commit
> > this nonetheless ?
> >
> > Details: The patch for am_edit makes it possible to install the mng 
already
> > present in kdelibs/pics/hicolor.
> > When the mouse goes over an icon (in konq/kdesktop), KIconLoader locates 
an
> > mng with the same name as the icon (currently only folder.mng exists), 
then
> > a QMovie is created to play it - each frame of the MNG is set as the
> > QIconViewItem pixmap, quite simple.
> >
> > The memory overhead is one pointer per icon (the movie, 0L most of the
> > time), and the filename for the icon in a QString (e.g. "folder").
> >
> > The patch moves m_size from KFileIVI to KIconViewItem -> no change for 
most
> > iconviews, however this makes the patch BIC.
> 
> The last API change is properbly the most easily acceptable now. It would 
> ease the way for including animated icons in KDE 3.1. Right now we dont even 
> depend on libmng.
> So a safe middle path would be to make your API change, depend on libmng but 
> postpone animated icons for KDE3.1. (depending on libmng could to start with 
> optimize the konqueror spinning icon).

[Almost] all the code is in the libs, for this feature. Without the m_size 
move, it would be a one-line patch for KFileIVI (libkonq).

Including the feature in the libs but not using it, means that it might have 
bugs that we won't see until we start using it ourselves. This sounds quite a 
dangerous approach, providing an untested feature to app developers.

About konq'a spinning icon: Waldo already optimized it, to load icons from a 
big pixmap that contains them all, he found this much more efficient than 
using a MNG. For the mouseover animations, the needs were different (need to 
let the artist define the delay, and animation doesn't run all the time - and 
especially not while CPU-intensive processing is happening, as is the case 
with Konq's animated wheel during HTML rendering), so using MNG was ok.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david, http://www.konqueror.org
KDE 3.0: Konquering the Desktops
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic