From kwin Sun Jan 31 10:32:30 2010 From: Vishal Rao Date: Sun, 31 Jan 2010 10:32:30 +0000 To: kwin Subject: Progress bar animations for KDE 4.4/4.5 ? Message-Id: X-MARC-Message: https://marc.info/?l=kwin&m=126493325916099 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