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

List:       kwin
Subject:    Progress bar animations for KDE 4.4/4.5 ?
From:       Vishal Rao <vishalrao () gmail ! com>
Date:       2010-01-31 10:32:30
Message-ID: aacba7e1001310220i50d3a172q26965a0eaf9ef320 () mail ! gmail ! com
[Download RAW message or body]

Hi,

I was pointed towards Hugo Pereira Da Costa by Aaron (aseigo) on IRC about my
questions regarding KDE 4.4's progress bar animation which is
currently quite bare.

Thanks to you Hugo for showing me around the code. Here is a youtube clip of my
work for today: http://www.youtube.com/watch?v=zrvCprVHqag   :-)

Unfortunately, the code for the demo video has severe caveats/cheats
and in spite of my
bare knowledge of Qt/KDE code it looks like KDE will need a wrapper/decorator
class "KProgressBar" or send patches to Qt to extend QProgressBar for really
sweet animations.

I've changed KDE 4.4 progressbar anim code (oxygen files) to:

* Use InOutQuint instead of InOutQuad QtEasingCurve for more pronounced
movement (more amplitude I think)
* Increased the "duration" parameter from 200 (default 250) to 1000 ms.
* Set timer interval down from 50ms to 5ms.
* Changed so-called "opacity" min/max from 0.1/0.9 to full 0.0/1.0 range.
* Tweaked the valueChanged() and timerEvent() callbacks/slots.

The "severe caveats" I was mentioning, are, if I'm not mistaken:

* QProgressBar setValue/valueChanged are being conflictingly used by
user code as well as the animation engine - a QtProgressBar limitation at
the moment I believe.
* User must create progressbar with large number of steps (100 or in the video's
case 1000) to get smooth effect. If you create for example a progressbar with
just 3 steps it will jump sharply from one to another with no
animation possible.

Thats why I believe a "KProgressBar" will be necessary to differentiate between
user-set values/steps and internal animation based higher granularity steps.

Hugo also advised me that maybe I should look at scrollbar pageup/pagedown
animation to make it smooth too, and I am happy and motivated to try my
hand at that :-)

I was hoping it would be a minor fix so that perhaps KDE 4.4.1 might
have this in
time for my distro (Kubuntu's) LTS release, but sadly looks like something that
can only happen for the 4.5 timeframe at the earliest.

Regards,
Vishal

-- 
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread] 

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