played with qtimeline and animations over the weekend. qtimeline really takes out the annoying gruntwork of doing all the math for timers and what not out of the equation. one thing i did was make the new clear button in lineedits fade in/out when text was there or not, making it obvious that the button is associated with text being in there.
the animation bit was easy. the problems i ran into are that qlineedit::clear() isn't virtual anymore so an app can make the lineedit and the button fall out of sync by calling clear (though it'll fix itself once the user starts typing in it again) and there's probably not much i can do about it. cutting down on the virtuals was nice for startup time and what not, but it sure gets in the way when trying to make interesting things happen that weren't foreseen. which i seem to do fairly often. =(
the other issue i ran into was our icon theme not being svg. which means i only had crappy bitmaps to use for the animation if i wanted to use kiconloader to get the standard icons (which i do). the oxygen team is threatening to get oxygen into trunk over the akademy week at which point we need to add the ability for kiconloader to return svg data instead of a pixmap if desired. that way we can load the svg into an app and do things to it, like change the stylesheet or perform runtime compositions. the latter will be most useful for limiting the number of icons in a set while increasing the consistency; for instance, we could change the mimetype paper and all the mimetype icons would still match, even 3rd party ones.
luciano montanaro did some work on getting kicker to sleep more often and posted a patch for the clock to bugs.kde.org that makes it only trigger its timer once a minute if you aren't showing the seconds or blinking the dots. this being the default configuration, it will have a nice positive effect in that kicker will now go to sleep for a whole minute at a time instead of waking up twice a second. laptop batteries rejoice. i reworked the patch to sync to the minute more or less perfectly and check for drift so its still accurate to within a second or two and committed it for the next 3.5.x release.
and speaking of timers and kicker, i noticed while researching this a couple weeks ago that some styles do really nasty things that they just really shouldn't be doing. for instance, polyester starts qtimers when certain widgets appear (such as a combobox) and then never stops them. so as soon as a combobox shows, the app will wake up several times a second from that point forward. seeing as all apps use the same style and many/most use these common widgets, that means that most of the kde apps will end up waking up several times a second. this is really not nice for systems in swap or on battery power. ugh!
another fave of mine is qtcurve which changes the background mode on qtoolbuttons. this results in huge amounts of flicker in the taskbar, particularly after some of my recent painting optimizations where it just becomes more obvious. hint: don't change the properties of a widget in a style unless you can guarantee that it won't affect the painting of the widget. in this case, qtcurve should be checking that the widget hasn't set the background mode to nobackground. hopefully they'll fix this in the next release. but i won't get back the couple hours i spent trying to figure out what the hell was going on only to discover the offending code in qtcurve. =/
moral of the story is that when writing styles remember that its something that effects every widget and every app so one has to be very conservative and keep the potential side-effects "footprint" small.
i think the plastik and keramik developers, to name just two styles, have done well in this regard.
Monday, September 11, 2006
Subscribe to:
Post Comments (Atom)

5 comments:
Ew, the style stuff sounds nasty. And I've seen the taskbar flickering also at my new favourite theme Serenity as wel:
http://www.kde-look.org/content/show.php?content=35954
Btw., that is a theme with some abilities I really would like to see in KDE 4 as well, it's worth a look.
The flickering in Kicker is most obvious on my old machine, a Pentium Pro with 128K memory. They're very useful at pointing out places that need optimization.
oops, you caught me :-)
When I got the animation support to work in Polyester, I've never touched it since then.
Now I have modified it a little bit (when no widget is animated the timer is stopped). It should be at least not perfect but a little bit less resource sucker now.
@liquidat: theme is interesting. some good ideas. i couldn't use it day-to-day though =/
@anonymous: yeah, i need to power up the pii 400 to see how things are sometime.
@mart: heh.. glad to see it's fixed now. i'll check out the next release.
I just installed Kubuntu-desktop onto my ubuntu machine to try it out. Pretty cool, but the polyester theme was killing me, thanks for posting this Aaron. Defintely shouldnt be the default in kubuntu, it scares away new users im sure as i was ready to dump it.
@mark:It's 2008! so i'm guessing the theme kubuntu has is the broken one. yikes!
Post a Comment