Schizophrenic clock effect

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.

Touching up Plasma's digital clockAfter 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.

Clock with new effect on the desktopSecond, 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.

32 Responses to “Schizophrenic clock effect”

  1. dimitar says:

    I had a problem with the flat digital clock, which was caused by the fact that the wallpaper image on my desktop changes and I can’t see the black digits of the clock on images which are almost black under the clock. My solution was to use the Customizable Clock and adding a text-shadow element in the CSS. Of course the result is very ugly, but it’s usable for me, because I can read the clock easily on any kind of background. So, any chance for a backport in 4.5 or should I try a little bit more with the CSS :) ?

    • sebas says:

      I haven’t seen any contrast problems, the theme background should always be opaque enough so that text painted in the theme’s textcolor is readable well on the background — no matter what the wallpaper looks like.

      Can you show a screenshot of this issue, or maybe file a bug on bugs.kde.org and point me to it?

  2. Naproxeno says:

    Wow. Very interesting read and very nice results. Thanks for your work!

  3. fva says:

    I’d suggest applying at least the gradient to the date line too. Right now, the clock looks a bit strange if you set it to show the date on a separate line.

    • sebas says:

      Jep, I need to look at date and timezone display as well. Probably just making the text slightly translucent would already do the job.

  4. Alejandro Nova says:

    I am really missing the KDE 4.0 beta clock. You know, a clock that looked like an early digital clock, with numbers looking like half pages. Also, you may animate the transition between the “pages”. I’m speaking about this: http://www.muylinux.com/wp-content/uploads/2009/03/kde4_beta3.jpg (see the clock on the right-upper corner)

  5. I really love the level of attention to detail KDE gets!

    You are damn great! (You as the inclusive “you”, taking in you and all the other KDE devs I ever read and didn’t read about)

    Many thanks!

  6. uetsah says:

    “This might look like a small improvement, it’s nevertheless time well spent.”

    Yes, definitely!

    Keep up the good work!

  7. bill says:

    re: the klipper icon – any chance or revising the old clipboard (scissors just doesn’t cut it for me – was that a bad pun I just made?), And for the paste icon a paste jar’s brush (sort of a thin brush with the handle protruding a jar’s cover), a wide paste brush or a paste jar.

    • sebas says:

      You can ask on the kde-artists list about this, I’m not directly involved with creating icons (and you certainly wouldn’t want me to, either :-)).

  8. kdeuser says:

    It seems that Oxygen theme has gotten some attention in KDE 4.6. Will it be just a black version of Air in next relase? KDE 4.5.2 version’s still kinda broken, there are blurry borders and past relase .svgz file etc.

    • sebas says:

      I’m not aware of any such issues. Do you have bug reports about this, or can you maybe report it if it’s not already known on bugs.kde.org?

  9. Unnamed says:

    I must confess I like it. But, what about users with compositing disabled? Why does plasma have to be ugly as hell? What about some kind of fake transparency?

    • sebas says:

      Fake translucency (I assume you mean this) is something we consciously decided would not happen in Plasma. It has several technical problems (fake translucency would only show the desktop background, but not windows behind a panel for example, and it’s slow. The correct (and working as of today) solution for making panels or windows translucent is to use a compositing manager for these effects.

      This has been discussed extensively on the plasma-devel list, by the way. If you’d like to know more background on this topic, I’d suggest you go through the archives.

      • redm says:

        Well, the problem is that non composite versions of plasma themes don’t get the same amount of love as the composite ones. E.g. Glow, even shipped with KDE SC, it doesn’t style some backgrounds in the noncomposite version as of 4.5.2, a bug probably. But nobody cares. Also it seems to use just Oxygen elements in it. The composite version looks a lot more polished. And I fear that won’t ever change. Probably because most designers have a working compositing setup. As a matter of fact this is not the case for a lot of users. I mean I can understand the theme designers, as it would be twice the work for a version they don’t use. IMHO there should be only one theme version and plasma should take care of making it look nice without compositing, e.g. by blending some background behind the translucent panels.

        Btw. the but-you-can’t-see-the-windows-behind-fake-translucent-panels argument is kinda pointless, as you can’t see them behind non composited ones either…I don’t see a problem with that. And it might be slow, but still faster than real compositing on those systems.

        • sebas says:

          We’ve gone over this, more than once. All your points have been discussed to death, that’s why I was referring to the mailing list archives, I really don’t feel like wasting my time on yet another round discussing this issue, and I won’t let others steal my time by bringing up the issue again, and again, and again.

          In the end, it’s the Plasma team’s prerogative to determine Plasma’s direction, and I don’t know anybody in the core Plasma team who would be willing to maintain such a horrible hack.

          End of topic.

          • redm says:

            Note that my main point was more of a general nature. I probably should have left out the “Btw” part. If you say also the general problem has been discussed to death, then apparently no solution came out of it. Do plasma devs simply don’t care enough about users without working composite. Or maybe they think composite will be working for everyone “really soon”? I don’t know. Anyway, since I started using KDE4 with 4.1 not that much has improved in this regard. With a barely working composite I still feel like a second class citizen. During that time I also gave up hope that drivers will improve any time soon.

          • TheBlackCat says:

            I agree that fake transparency is a bad idea, but redm’s main point about the ugliness of non-compositing themes is valid. In my opinion even the default air theme looks terrible when compositing is off. It is bland gray with poor color contrast in elements.

          • sebas says:

            This lack of love you’re complaining about is mainly caused by a lack of resources in our design department. Regardless, the small team is doing one awesome job, but it does mean that things fall off of the table here and there, we’re lucky enough it’s the “less critical” ones that are a bit left behind. (Not to diminish the importance of beauty for non-composited systems, but I think “less beautiful” is still miles ahead of “doesn’t work at all”, which is how the GNOMEs seem to tackle this problem.

            Bottom line: We need more artists.

          • redm says:

            I completely agree with you. And this was not meant to offend our artists, they are doing an awesome job, as you say!

            However this is not just about the official artwork. For something like the Air theme someone else of the artist theme might step in and fill the missing pieces. But all the individual designers out there are mostly on their own. They use composite, they create the composite version of plasma themes first and the rest remains mostly a TODO. Which is very understandable, as it means more work and they don’t use it after all. I would probably do the same. Users try the theme they saw a pretty screenshot of, but without composite => frustration.

            Sure, there might be a lack of artists, but you can’t make them appear magically. And it also won’t help those creating a theme on their own. So this is not a solution. The question is what else could be done to improve the situation?

            That’s why I suggested: Reduce the requirement for plasma themes to only one, the composite version. And then let plasma do the rest, like blending a solid beackground behind the transparent panels. This would reduce the necessary work. And it would be to the advantage of everyone. Artists have less work and users get nicely looking artwork with high quality.

            Example: I use the SlimGlow theme and I love it. However the panel it uses in the noncomposite version is the blue Oxygen panel.
            1. This looks weired already with Oxygen (ok, this may be my personal taste, but also the blue doesn’t match the other Oxygen blues)
            2. It doesn’t fit the SlimGlow look at all
            3. Blending the transparent panel with black background already looks a lot better.

  10. ML says:

    I really like the new look of the tray icons / clock. It works with booth dark and light themes that is a huge +.
    It has a “strict professional” and “nice” look at the same time.

    /ML

  11. Francesco R. says:

    Very nice, but seem computationally expensive (no idea how much), may be useful to take different code paths for digits say less then 16 pixel height?

  12. BartOtten says:

    How small actions can change the world. Styling the clock was a masterpiece…..Thanks for your work!

  13. Andriy Rysin says:

    Just wanted to say that for keyboard layout indicator that often sites close to the clock in system tray I used the “shadow” code from plasma. So it seems like now these two will look quite out of sync…
    Probably another reason for new KStatuNotifierItem to support showing text – so that the icons don’t look out of sync.

  14. Rno says:

    Hello,

    really nice work! Can you tell me where I can find your patch to try it out?

  15. John B says:

    What I as a plain ol’ user with no skills other than how to get around on the ‘net, miss, is the customization control I had with the clock (and lots and lots of other things!) in KDE3. Now, with KDE4, I’m lucky to be able to adjust the size of a font…I’m stuck with what *others* think I should have to like and look at all the time. Yes, tthe little thing you’ve done above with a “translucent gradient’ thing looks good, but it’ll use even *more* room on the taskbar and those of us who like having the day and date with the time there, will be stuck with an even *smaller* font size under the clock – unless of course I want to enlarge the darn taskbar into an ungodly size itself.

    I’m not meaning to denigrate what you’re doing, it’s good work and looks good…but it’s not what *I* would like to see and I just simply miss having the ability to make it what *I* want…not someone elses idea of what *they* think I should like or be stuck with.

    • sebas says:

      Your basic assumption is wrong: The clock doesn’t take any more (or less pixels) than it did before. As a result the rest of that paragraph is moot, and partly just plain wrong: Plasma and most applications shipped in their KDE 4 versions are not any less configurable or flexible than before. We did clean up the UI, put many things directly in the context of the object they apply to. The cleaner UI is often mistaken as “less configurable”, but in fact there’s only a very small number of things that were possible with the KDE 3 versions that aren’t with their new versions. You’re not the first to make this mistake, it’s actually a common misunderstanding — but as I said also a wrong one.

      I can also not agree with your complaint about the lack of configurability. We’ve consciously kept the digital clock in the default Plasma theme plain and simple, but there are many other clocks around which you can use instead thanks to Plasma’s flexibility. Really, adding all kinds of “propellerhead-options” is not the way to go for default Plasma applets. For those that want full control, it’s easy enough to install a more customizable clock widget, or write one yourself (it’s really trivially easy using Plasma’s scripting capabilities).