cat /dev/maxilys

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

2007-01-29

KDE: Special delivery!

Special delivery of gingerbread for the eyes! For once, I'll keep my hands away from the keyboard and let the pictures speak for me. According to the time it took me to make them, they're worth a million words! Any way, if you have questions, you know where to find me. ;-)

Tabs and focus highlight
(Colorscheme: Mare Serenitatis)
[Image]
Click for full size: (682x492) 37,8 KB



A glance at the windec configuration dialog
(Colorscheme: Caloris Planitia)
[Image]
Click for full size: (624x279) 38,0 KB


The 16 possible titlebars
(Colorscheme: Neptune)
[Image]
Click for full size: (1156x493) 55,0 KB


My favorite setup
Solid top and flat buttons in various colors
[Image]
Click for full size: (698x448) 50,5 KB


Need I to say this is the future Serenity 1.7? ;-)

Labels: , ,

2007-01-26

No gingerbread...

Finally, I'm back to where... I was yesterday... again! During the night, Serenity window decoration hit an invisible barrier at high speed and --of course-- disintegrated itself.

As usual, I was driving my coding vehicle way beyond the speed limit on a highway toward the wonderful city of New-Release. Probably because of the lack of lights on the french highways, I saw nothing. All of sudden, I found myself sliding on my rear end with nothing left but the wheel in my hands. My brand new Windec 1.7 was far away behind me under the form of a pile of spare parts.

My insurance company agreed to bring me back home with my ton of spare parts. Then, all I had to do was to start again from my old Windec 1.6. No problem. But this time, I drove more carefully and brought my wannabe-new Windec to the garage after each part I added to check everything.

Now, I'm back to this moment where I'm about to change this big part of the body. The very moment that led me to the catastrophic disintegration. Wish me luck! ;-)

And the gingerbread?

Yesterday, I bought the best gingerbread I've ever eaten. So, for the unfortunate ones that can't find a french bakery at every corner of the streets, I wanted to give some gingerbread to their eyes: snapshots!

I partially re-designed the configuration dialog to give you a better control over the colors of the windec buttons. As I already previously wrote, it was a total mess with a lot of (hidden) inter-dependencies that clouded your choice. I was trying to be too smart and to always obtain an "optimal" result whatever choices you could make. Now, it's your responsability if you choose wrong colors that render the buttons invisible. There are rare cases where it's possible but that's not important since that's a result you can also obtain when you select "Toolbuttons" as button type. And an old friend from the early days is back: the standard highlight color. You can use it for the hovered or pressed buttons.

Well, there are so many things I could say but it would be better to show them, one way or another.

Any way, yesterday, I was also decided to show the new body of my Windec 1.7 --some visible changes around the titlebar-- but I had to made that body change first. And here came the unlightened highway during my test drive... and the mysterious silent crash.

No gingerbread, today. ;-)

Labels: , ,

2007-01-23

Divide and konquer!

No, my last post isn't over a month old. The problem is that the last time I blogged, Blogger was "off duty". It crashed just when I published so my post got lost. I have what I wrote --because I trust so much Blogger that I copy every post in the clipboard before publishing-- but these are old news. So, let's start again.

Back to business! The monthly release of Serenity is on its way. I touched something that has annoyed me for a long time: the scrollbars don't sink under the pressure any more. I had found this behavior ugly but I never did anything because I was so used to see the scrollbars react like buttons. Somebody asked me if it was possible. I looked, patched and kept the answer for me. ;-) Whatever, that's better now since I've already done my best for these scrollbars not to look like buttons.

Another itch I had to scratch was the way the colors of the gradients were calculated. There were several problems: You can't have a color brighter that white, black can't be brightened nor darkened.

For a color brighter than white, I took as solution the one used by the washing powder makers: to add a little touch of blue. That wasn't perfect but it worked good enough to have a "milk look", i.e. white buttons on a white background. That wasn't perfect because the little touch of blue didn't fit with every colorscheme. A better solution was to add a touch of the global tint. I found a way to calculate it when it's not defined by the user. That's still not perfect but I'm getter closer.

I found why the black can't be brightened in the sources of QT. The code just doesn't work with RGB values equal to zero. It does it's calculations but it will always return the same black: #000000. Totally useless. So I wrote my little routine that recognizes all the greys (from black to white) and returns better results, including the brighter white with a touch of color. Wait... and see. ;-) I wrote my little routine because darker than black is the same problem that brighter than white but the other way around.

Since I found a little stupid to handle only the special cases, I ripped QColor::light() and QColor::dark(), simplified them and put the result directly into Serenity. I gained some more few ms on each gradient so Serenity is faster... again! Well, that's not as obvious as with some of the accelerations I previously did but I'm sure the CPU notices. ;-)

While I was dealing with the colors, I changed those of the gradients of the tabs and of the menubar. I made them more obvious in a very discreet way. (That's an oxymoron...) ;-) And, in both cases, Serenity now offers more choices to make them look brighter, darker or both and vice versa.

I also simplify all the tabs: No more button-alike shape on mouseover, the tabs only change of color and if they're concave, they become convex to look more like something to be clicked. And I did the same for the menubar but I kept the button-alike shape for the cases where the menubar groove is flat --i.e. either solid or empty.

The penultimate thing I did was to use an underlying unused mechanism in Serenity: the possibility to redraw textboxes when they acquire the focus. I thought it was useless and that the blinking cursor was enough but, in fact, I like the subtle way the textboxes can be highlighted. In this respect, Serenity was well designed. I acknowledged the focus in changing the color of the frame when needed and it immediately worked everywhere: the textboxes, the edit lines, the spin widgets and the editable comboboxes all at once. Neat! ;-)

The last thing was to enable you to set the popup sub-menu delay up to 1 second instead of 1/2 second. You will probably need some time to get accustomed --I did.-- because 1 second is a really long delay. The sub-menus look like not to be reacting and you need to learn a new behavior: to click to make them appear... instead of letting them pop up your nose. ;-) Now, what would be nice is that the sub-menus close themselves with a second click so that you have a total control. Unfortunately, KDE only closes the sub-menu to re-open it immediately. Maybe should I ask to the Trolls if they can do something for me? The future will tell.

That should be enough to justify a new release but I have to take care of something else first: The mess I made in the color selection of the buttons of the window decoration. That's more than a problem of label. That's a real usability issue. The various options produce, well, various results but in an unpredictable way. I was trying to change these buttons I see everyday and I ended up with the same buttons. I got lost in this jungle of too subtle options.

When I designed this mess, I was obviously working le nez dans le guidon as we say in French ("the nose on the handlebars"), in other words: too focused on what I was doing without thinking of where I was going.

What I needed to do was to clearly indicate, on one side, what base color is used to draw the buttons and the symbols and, on the other side, what color will be mixed with them, if any. That makes more sense this way... even if what I say doesn't make much sense. You'll understand when you'll see. I already re-designed the UI and it was a hard job. I failed at squeezing all the options I wanted into the "Colors" tab page and keeping a reasonable size for the whole dialog. So I kept the things the way they are, with the buttons and symbols color selection on the "Buttons" tab page.

That's what the title means: Divide the options in manageable (meaningful) units to conquer, tame, master, whatever them.

Well, now, it's time to turn my ideas into code.

Labels: , ,