cat /dev/maxilys

A glance in the mind of a KDE/Linux developer to see how ideas turn into code.

2006-03-08

KDE: Satisfaction

Blogger is down... Down the stairs. Probably pushed by some malevolant bug. :-D Meanwhile, I'm using Kate and I'll cut and paste later.

Well, I was saying "Satisfaction". Somebody finally gave me some usable infos to solve my QToolbox mouseover problem. (Thank you, Michael.) It appears that no mouseover was reported by the event filter because I didn't polish the right widget in the right way. Now, it works but maybe just a little too well. When I press (i.e. click) a toolbox tab, the mouseover effect reacts like a toothpaste tube, it splatters all around and several tabs are drawn as if they were under the mouse while they are definitively not. It looks like to happen at random but for my developer eye, it doesn't. I've already seen this strange pattern of incorrectly hovered tabs during my attempt with widgetAt(). I'm now almost sure I found a Qt bug.

Me: Who's there?
Qt: Somebody, but I'm not sure who.

That looks like fuzzy logic to me. And I don't even mention the strange path I must follow to recognize a mouseover situation. There's something wrong in this QRegion but I can't QPoint it (yet). (Overdose of Qt.) ;-)

All this doesn't prevent me from being very self-satisfied because I removed a bug of the Twilight Zone kind from Serenity. Along the evolution from Serenity this bug appeared and disappeared for no reason I'm aware of. The grip of a tiny scrollbar slider could disappear sometimes during a redraw. That couldn't happen because the slider is drawn with two instructions the one after the other but it happened anyway. To cure this disease, I buffered the drawing and I now bring the slider on screen in one piece. This a total waste of memory and CPU but if this is the only way, so be it.

The funny thing is that I now remember I already used such a buffering but I removed it as useless during a period when the bug had disappeared. It looks like I enjoy re-inventing the wheels I invented once and tossed in a corner as useless inventions because it snowed and skis became more useful. (If you see what I mean 'cause I don't.) ;-)

While I was working on these sliders, I made a last minute change to all the sliders. First, I set the grip of the scrollbar sliders perpendicular to the groove. It's now a tiny subtle mark in the middle of which the length doesn't grow with the length of the slider. Any way, a perpendicular grip is more logical than a parallel one. Second, I also changed the other kind of slider --the one that can have tickmarks like the volume slider in KMix. They are now parallel to their groove so that they look long instead of wide. The GTK-Qt engine likes them much more! That wasn't a real bug but a visual glitch due to the fact that a slider has a fixed size and the one I chose was too big for GKT that doesn't stretch its layout the way Qt does. A tiny bit of the sliders was always missing in the GiMP. Problem solved!

Now if I could take some time to clean the style configuration dialog, I could make --at last!-- Serenity's first release package.

Now, with the modifications I made to the sliders, I have to redo all my
snapshots. I'm already feeling too tired... ;-)

0 Comments:

Post a Comment

<< Home