cat /dev/maxilys

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

2006-04-25

KDE: Resistance is futile!

It's been a while since my last post. Last week I was thinking about making an entry with the title "Nothing to say" ;-) ...but I didn't. I waited for some real news and here there are: Serenity has been updated (again).

The first thing I did was to change the separators in the popup menus. Somebody told me they looked too much like in Plastik. I couldn't stand this insult! ;-) While I was at it, I reduced a little the mouseover frame around the menu entries and I added round corners. I also changed the popup titles to an absolutely flat area. Good bye Plastik look! ;-)

The only problem is that the popup titles in K-Menu don't react as expected. That's really strange. These popup titles are QHeader's and I check if their parent looks like a popup. It works everywhere except with that stupid K-Menu which apparently isn't a popup! I'm gonna have to dig a little more into the sources.

Digging has become a kind of habit. That's amazing all you can find, especially all the possible twisted ways to misuse a widget!

For some times I was thinking about finding a solution to the sunken lines used instead of a regular KSeparator. I had a Kate session to open the QFrame sources along Serenity's ones. They were there but I didn't really look at them... until I decided to make an experiment. I intercepted all painting actions of a QFrame in Serenity's event filter and I draw a rectangle instead.

That was the most brilliant idea I've ever had. I discovered (visually) that these ugly HLine and VLine (the sunken separators) are indeed QFrame's but there was more. The groupboxes are also QFrame's. The sunken separator with a title is also a QFrame. And in fact, there was too many frames! All those frames that I patiently removed were back! Arrrghh! :-D It's was high time to look at the sources of QFrame!

Well, things turned out easier than I thought. All I had to do was to look at the frameshape() property to sort out the various frames. I took care of the HLine's and the VLine's first. That was easy since there's not much to draw. But that wasn't enough. The sunken separator with a title was still here. A quick look in the sources of the style configuration module and I got what I wanted to know: This ugly thing is indeed a groupbox with an isFlat() property. That was it. A little bit of fontMetrics() and I could redraw it the serene way: A line with a rounded frame in the middle to contain the title. Done.

That was almost too easy. Since I was dealing with the groupboxes, I totally changed the drawing of the regular ones. I once dreamt about putting a plain box behind the title but that wasn't possible because, when drawn in the regular way, the title erases its background. In the eventFilter(), I can do all that I want. The title is now in a plain box inside the frame of the groupbox and I also added a checkbox in the config dialog to deactivate all this and fall back to the regular drawing. Any way, I need this fall back since I can't handle checkable groupboxes (yet).

I now kinda think that nothing is impossible. I'm gonna "serenitify" the last widgets that resist me. "Resistance is futile" I said.

2006-04-07

KDE: Happiness is...

Happiness is just simple as a good comment. It was about a Matrix style colorscheme but --indirectly-- it was about how good Serenity can handle dark colorschemes. Probably was I in a good mood, but I really enjoyed it --once translated in French. ;-)

As for Serenity, if I'm here that's just to say a few words about my style. That's it, I made a new release. There was that tiny visual bug on the checkmarks in HTML pages that I couldn't stand any more. Gone! The fix isn't elegant but there is no 100% sure way to know if you are drawing on an HTML page, so I had to find a sort of clever way.

I also added tiny buttons behind the sub-menu arrow. I saw this on a screenshot somewhere and I wanted the same! But when the menu entry is hovered and the sub-menu is opened, the tiny button is depressed. That's really nice... and I don't think the style I saw does the same thing.

I also played a little with the "gradient engine" of both the style and the window decoration. There's no real "engine" since KDE draws all the gradients but the so-called "engine" now can tune the parameters passed to KDE in order to draw different types of gradient, and eventually totally bypass the gradient drawing to draw a flat area instead. The "flat" gradients are especially nice on depressed buttons. It gives the impression the buttons are engraved on the surface of the window. Otherwise, the "engine" can produce buttons with a very smoothly curved surface --almost flat-- or Serenity's regular buttons, or else buttons with a more curved surface that improves their look when using a dark color.

But this is only the first step. There are still a few different types of gradient that could be worth playing with.

Well, if I don't already start a new style. I saw an interesting volume slider on KDE-Look. I still need to figure out what the other widgets will look like but what I have in mind is something definitively more alien than Serenity. Any way, I will probably wait for KDE 4. I need the anti-aliased drawing capabilities of Qt 4.

Already?! ;-)

2006-04-02

KDE 3.5.2: Something's missing.

This is not a rant but I'm getting more and more frustrated by every update of KDE. This is still not KDE 4! Whyyyy?

OK, let's them work. They said 3.5.2 was the last release until KDE 4. So, sit and wait.

Any way, there are some real reasons why I'm unsatisfied. There are some annoying bugs that reached the users --and that includes me. The first one is that brand new inability of Konqueror to copy a file into the same folder. Formerly, Konqueror proposed to rename the file. Now, it just refuses to copy because the name already exists. Stoopid! The one who removed this possibility should dragged on his knees in front of the angry crowd to beg for mercy! ;-) Sorry, dude, but what were you thinking about? This is really annoying.

Kate keeps on crashing when you save a file and to re-create a file from the backup, we now have to do real contortions. Well, it looks like now Kate crashes only after having saved the whole file so the missing feature poses no problem in this situation... but in all other situations, ouch! To create a backup file next to the original is now a P.I.T.A! That's a real pity.

I also have a strange problem. The Control Center has its name in English in the K Menu instead of French according to my language settings. I doesn't bother me much since I seldom use the K Menu and the Control Center but it gives a bad feeling about KDE 3.5.2. If something so obvious has escaped to the developers, what maybe less subtle bugs are also hiding behind my nice Serenity style?

And the thing that definitively gets on my nerves: Please, stop touching the icons in Konqueror's toolbars at each update! I don't care what the developers or whoever else want to see in the toolbars. I have user settings and that's what I want to have. So, please, don't reorder the icons, don't remove items... and first of all, don't add new icons! I don't even know what was added once again and again... I just saw something new and I ran my script cleantaskbar. Good bye! But this didn't prevent me from having to re-build a decent toolbar for all the users of my system. (Luckily, only 2.)

Apart from that the bug in KHTML that makes Blogger's entry form strange isn't gone. And this isn't due to my style. This rather looks like a Javascript bug. Sometimes I wonder if somebody ever tests KDE before a release. (Disappointment leads to frustration. Frustration leads to bitterness.) Maybe the build process is so automated and complex that nobody releases KDE, it just escapes by itself from time to time. And when somebody notices, s/he hurries to KDE-Look to announce the escape. ;-)

I'm sorry if I have nothing more positive to say but the problem is that there's nothing new in KDE. I don't want much... Just crumbreads in Konqueror's URL bar, for example. That's the kind of tiny things that proves to the users that KDE is evolving. The bugfixes aren't enough, especially when the obvious ones I know aren't fixed and new ones appear. It has been so for a few releases already. There's always that tiny thing that is missing. The tiny thing that would make us say the last release is different from the previous one.