cat /dev/maxilys

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

2006-10-27

KDE: Intentionally left blank

In order to give more room for the window decoration preview, I totally re-built Serenity windec configuration dialog from scratch. I also gained a lot of space for the options in the process. Now, there's so much space that I had to put two warnings "Intentionally left blank" because of two large empty spaces. It looked too much as if some options refused to show up!

I don't know where it comes from but I have vague memories that this kind of warning was a subject of laughter once in the past. I'm almost sure that it's related to the "dark side of the Force". It's so easy to mock them. ;-) Whatever...

I arrived at this solution because I removed the 9th button style "Solid bar" and turned it into a switch labelled "Draw a solid background" so that all button styles now can have the "solid bar" look. I felt that the titlebar was a little... bare.

As a side effect, my favorite button style is now "Menubar" with a solid background and an extra-space in between the buttons. This option that I didn't want to add proves to be useful. Il ne faut jamais dire "Jamais". (Never say "Never".) ;-)

The last option I added was a subject of an argument with a french user. --I speak so rarely in French about Serenity that it's worth mentioning.-- (Salut, BenoĆ®t !) Poor Benoit who received a rant as answer to his request for some changes that I didn't like!

To sum up, I argued that a window decoration was more art than code and I let the artist in me rant about how two pixels could affect the entire windec. :-D I wasn't that serious but he probably took me very seriously since he didn't answer. Whatever... I comfort myself with a second post I received about the (proposed) inclusion of Serenity into a distro. ;-)

Any way, thanks to Benoit, I added the "Extra-space" switch which didn't force me to undo things that I did but made me write more clever code. And the last option that he wanted was to be able to reduce the border of the window.

This one, I fought hard against it. I just didn't want. For me, six pixels were good and my only answer to any proposal was "Why do people think that any empty space is always wasted space?". What I was really concerned about is the fact that this so-called wasted space is in fact very useful when you want to resize a window. The only question I didn't ask to myself was "How many times a day do you resize a window?". My own answer would be "Never". The windows of all the applications I regularly use have been resized once and that smart KDE remembers what I did. I just don't resize windows. Period. So, I surrendered to the reason.

I added a combobox to select the border size from "Minimal" (2 pixels) to "Double" (12 pixels). And once again, I surprized myself. I made a few changes in the handling of the options to accept a real numeric option instead of a fixed value in pixels for the border size and that was all. My code was already ready to accept a variable border size. Amazing, isn't it?

I hoped these KonqFileTip's were as easy to tame but they aren't. The color of the displayed text is hardcoded somewhere and I haven't found where yet. I know for sure because I removed absolutely all black from the colorscheme I use, I also changed the black color used by Konqueror to display the files names... and that fraking text was still black!

I tried changing the palette of the text widget, changing its foreground color --changing the background works at least--, changing the whole palette of all the QToolTip's. Nothing works! Absolutely nothing! And I'm sure I reach the good widgets since I'm able to change their background color. The rest just fails on me. I'm gonna break them... But not today.

What I did today, is to solve a little problem. I was over-enthusiastic last time when I talked about my alledged optimization of the menubar drawing. This "optimization" bit off a bit of my nose today. That's not entirely my fault, I must say. This is Opera's fault. I don't use Opera very often but today I wanted to check the look of an HTML page, especially regarding the sizes of the fonts. And there it was: the hollow space around the menubar! The reason: Opera simply ditches the menubar frame and never draws it.

A long time ago, I was talking about the 1001 ways some people use and abuse widgets. This just the 1002nd of my collection. (Grumble, grumble!)

By the way, I hate the fact that the tab closer buttons are on the tabs. Firefox 2.0 copied this idea but I definitively don't like it. I don't know what usability experts would say but I think it's better to have one single button always at the same place than several tiny moving buttons lost in the middle of the jungle of widgets. I know that Konqueror is also moving in that direction but I still say that's a bad idea. Future will tell.

In the mean time, I keep on going with Serenity. What I already did is to insert an intermediate style of the tree branches in between "solid line" and "no line at all". That's what I'll do with the panel resizers: Add an intermediate style in between the current zipper and the total invisibility. But I'm gonna have to totally re-organize the style configuration dialog too because I know that inserting another option will make it higher than its calling parent. Three columns instead of two but less tall. Any way, I'm not satisfied with the way the current dialog resizes itself, so I'm going to make everything with Qt-Designer and use 'make'.

I've already prepared my gloves and my mask. This will be major surgery for Serenity style: the grafting of a .ui file.

Right now! (Well, after my coffee break.)

Labels: , ,

0 Comments:

Post a Comment

<< Home