cat /dev/maxilys

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

2006-09-01

KDE: Never enough...

It looks like I can never get enough. I updated Serenity once again. But I didn't release it immediately because, when I was looking for a good colorscheme to make a snapshot, I realized that the progress bars definitively should have another color.

Here is what Serenity 1.2 looks like with the colorscheme "Caloris Planitia". Notice how the progress bar fits in the dialog. That wasn't always the case and that's what led me to stop the release. I had to achieve the same effect with any colorscheme but the colors I chose for the progress bars didn't make it.

I just launched a "background process" in my mind to work on this and I got the solution when I finished typing in my blog. Multiple personalities is a good thing... sometimes. ;-)

Well, if you looked at the snapshot, you couldn't miss the new Zen gradients. I was growing dissatisfied of the titlebar the way Serenity drew it. Too flat, probably.

My first idea was to fill the titlebar and the window frame with some color. It lasted less than one day. To make things look better, it was necessary to make the menubar groove match the titlebar. It got me into troubles. It wasn't so hard to get the color of the titlebar gradient from within the style but I couldn't find the right way to know if the window where I was drawing the menubar groove was the active one or not. And even without that, I got a big problem: The GTK apps refused to start because the GTK-Qt engine --I guess-- was complaining about something I did.

Next idea, please!

I did it again but the other way around. I filled the titlebar with color of the menubar groove. That was much easier... but I didn't really like the result. Too dull.

Next idea again, please!

I totally dropped the idea of filling the titlebar with any color. Instead, I focused on the frame. First, I wanted to make the whole window have a diagonal gradient like Serenity's buttons. It was a stupid idea implying a lot of calculations to get the right colors to draw all the needed gradients that would be barely distinguishable in the so tiny space of a window decoration. Nevermind, I could get close through some simplifications and in a little more space. That led to the new framing you can see on the snapshot. It doesn't require that much calculations and I found the result amazing. (Yes, I know I flatter myself... but that's because I know what's behind the result. And especially behind the 35 pixels at the bottom right of the maximizer!)

Then I thought: "What would the buttons look like if I used the same design?"

The result --as you can see-- is very nice. So, that was it! I got a new way of drawing buttons and surfaces in Serenity. I called it the "Zen gradient". I removed the "Soft" and "Hard" gradient to leave only three gradient styles in Serenity: "Serene" (diagonal formerly known as "Regular"), "Zen" and "Flat". As usual, everything is switchable to be able to make Serenity look like its former self. I personally fell in love with the new Zen surfaces. I was very proud of my diagonal gradient routine and now I can see it in every corner... literally.

At this very moment, one of my secondary personalities was knocking inside my skull to have the keyboard and implement the new progress bar colors. ;-)

And I said: Expect the new Serenity sooner than expected. --If you see what I mean. ;-)

0 Comments:

Post a Comment

<< Home