On the train back from the openSUSE conference, I read an article about improvements in Plasma 4.5 in the German edition of Linux Magazin. The author noticed the re-designed notification area with its more consistent and clean look, but also mentioned that the clock looks visually somewhat outdated in the panel now. Fair enough, most of the notification area has seen a bunch of iterations over their looks, but the digital clock didn’t really receive much visual love other than bugfixes in alignment and layout of the clock. I thought a bit about what would make the digital clock look better, and identified two things: the full bleed color sticks out a bit, and the clock looks flat compared to its neighbours in the panel.
After a couple of iterations and with feedback from some Plasma (and non-Plasma people) I have just committed to Plasma trunk what I think is a good-looking solution, and a touch-up of the panel, making the whole look more belonging to each other. As you can see in the comparing screenshots, it also works well with a dark theme, such as Oxygen. What I did is the following: First, there’s a backdrop behind the clock’s text display now, in the background color defined in the Plasma theme. On light themes, such as the Air theme, this produced an emboss effect, making the time appear slightly sunken into the panel. On dark themes, the backdrop is dark, and hence looks like a shadow, so the time seems slightly elevated. This difference in appearance has to do with how the human brain interprets dark and light colors. Wired has an interesting article giving some background on this — it appears that schizophrenic people’s brains interpret this in a different way.
Second, the time is now also displayed with a translucent gradient in the text and has a very subtle appearance of a lighting source, making it looks less flat and a tad more natural. The translucency gradient makes the time stick out a bit less, while still having enough contrast to be able to read it. The effect is a bit more clearly visible in a bigger clock, so here’s another screenshot of that. Thanks to Fredrik Höglund for this nice idea and the pointers how to do it. (You define a gradient a QLinearGradient, create a QBrush using this gradient, then you can instantiate a QPen using this gradient brush, and use this pen to paint the text.)
This might look like a small improvement, it’s nevertheless time well spent. The clock takes space on everybody’s screen, most of the time, so it should well be doing its job in an elegant way.