Code transitions - Theme transitions

Rafael Fernández López ereslibre at
Mon Nov 17 07:48:26 GMT 2008

Hi all,

I am pretty sure you remember the class Mathias Kretz did start for widget
transitions: KFadeWidgetEffect. It had serious performance problems that were
fixed later by me, fully basing the code on the work done by Fredrik Höglund
on KFileItemDelegate.

My question here is clear: after the performance problem was 'fixed', I did
add transitions for paged dialogs (for instance, most of the configuration
dialogs). The Phonon KCM also uses it when you switch between sound devices.

I have installed bespin style for trying it out. It contains lots, lots of
animations. One of them is when you switch between widgets (on a stacked
layout or something like that), since it transitions when you change tabs. I
have the feeling (haven't tested it though) that when I switch between config
pages, it is somehow "slow", so I think maybe they are both trying to do the
same transition.

So I want to both ask and suggest something.

- Who should take care of asking KGlobalSettings::graphicEffectsLevel(), the
style or someone else on our code ?

If we decide that some part of our code (as it is right now), we should make
it very clear to the style that it shouldn't alter the settings that have been
set somewhere else (at the moment there is no way of graphically change the
graphicEffectsLevel, but it will be).

I ask this mainly because I have read on IRC that QTreeView::setAnimated()
seems to work fine and is nice. I was tempted to write the attached patch, and
later I wondered: "should this be really done by kstyle?".

On the other hand, seems to be natural, because adding the same options for
every style that will be developed is not a nice thing. Imagine a "fade
transitions" on every style configuration dialog.

So, summing up:

- Styles in general should ask KGlobalSettings::graphicEffectsLevel() if they
provide animations.

- What animations should they provide for not hitting other kind of animations
set at other level (e.g. KStyle or widget level [like KFadeWidgetEffect]) ?

- How are we going to tell styles what animations should they NOT provide
because they hit some other animations set at other level ?

Rafael Fernández López.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs.diff
Type: text/x-patch
Size: 884 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list