Author Archives: Marco Martin

Crisp Plasma dialogs borders

Graphics

Since yesterday The border of plasma dialogs like the clock popups have got rounded borders also when the composite is disabled, just like tooltips before,ok not a big deal.
But what is changed is that before tooltips shape was an hardcoded rounded rectangle with a fixed shape and an also hardcoded white border and that kinda sucked…

A second problem connected to that was when compositing was active the windows only faked a non rectangular shape, but they still were stupid rectangles, so for instance you couldn’t click on a totally transparent area to make the popup go away.

Now the window shape is computed from the alpha channel of the background svg, it means now the windows have a shape similar to the one you would expect seeing the fancy transparent svg.

And it causes another problem if not well-managed, because if you use a fancy svg with cool antialiased borders, without composite you will get something awful like that (here zoomed 2x):

ugly borders

See that two black pixels on each edge? and if the radius is bigger the problem gets worse.
This because the semi-transparent pixels will become fully opaque. Fortunately the way Plasma::Theme works comes to rescue, because when compositing is not active it will load a different set of svgs when available (they are all the files in the “opaque” folder in the theme path), so for instance with tooltips when compositing is disabled it will load the following svg (here with an huge zoom):

good borders

Here you can see that the outer borders are made of big blocks that will be rendered with a size of exactly one pixel and will make the illusion of a perfectly round line, while the inner border is still round and antialiased.
So if you will make a sexy plasma theme don’t forget to provide an “opaque” version of the relevant svgs, that at the moment are widgets/tooltip.svg and dialogs/widget.svg (probably in the future there will be also krunner.svg).
these svgs must not have semi-transparent areas and they must have a pixelated border, There are some nice tutorials around on how to make a convincing pixel-based path, like this one.

What? very 90’s or eve 80’s you say? Eh, true, this is where the desktop without compositing comes from 😀

Hello Planet!

BlaBla

Hello world planet!
First of all thanks Clee for adding me so fast! For those who don’t know me (well, the mayority of you i suppose) i am sometimes a programmer of some kde-related things.
At the moment i am doing some work with Plasma (yes, i’m the one of the infamous click, drag… eject:P)

Other thing i’ve done for kde are the Polye ster kde3/kde4 widget style and Tastymenu, a kmenu replacement for kde3.

I don’t blog very often and my english is very “all your base are belong to us” but well, sometimes i will be here 😀

Tag cloud

BlaBla

Implemented a tag cloud to this website (and so phpwet) it were years i didn’t touch that crappy cms, but i can confirm my idea that i hate it but it’s the one i hate less 😛

nokia+trolltech?

BlaBla

Hmmm, don’t know how to feel about this, i only hope the developement of the desktop version of qt (especially the unix one) doesn’t slow down, they’re a mobile company after all.
I hope it’s a good news (nokia: hint hint, lgpl :P) but every time a big corp buys someone else i always fell a certain smell…

exams exams exams

BlaBla

Today passed ad exam, yeeeeeeeah!!
It was a quite long time since i passed last, and later I collected an impressive row of failures, it seems I’m quite bach on track 🙂
Not that the party will last long, because since i’ve promised myself to finish the university this year, the next year will be quite hectic between exams and thesis, so I won’t have time to do useless things like breathing or something like that, but yeah… I also fear I won’t be able to contribute to KDE so much 🙁 but we’ll see how i manage to wrap things up…