Wednesday, July 25, 2007

various applet improvements

in the last plasma screencast i noted that the backgrounds of applets were fugly. i believe in honesty like that, if only because you'd notice it too as soon as you ran plasma.

today a few of us sat down to fix it based on a plan that ruphy and pinheiro decided was workable from an art and code perspective. today pinheiro did up some art and andred did a proof of concept implementation for the twitter plugin. i liked how it turned out:



so i went and had pinheiro clean up the svg a bit, then went in myself with inkscape to tweak a few things like object ids and rewrote the background drawing around the concept. here's how the digital clock looks now:



any applet that calls setDrawStandardBackground(true) gets the fancy pants treatment.

i also imported zack's opengl based Plasma::Applet subclass into libplasma and added a check for it to the FindPlasma.cmake file so you can look for PLASMA_OPENGL_FOUND.

we're also most of the way down to having a contents rect based coordinate system for applets with Plasma::Applet handling boundingRect itself

5 comments:

Diego said...

very nice work, congratulations!

and keep up the good work! :D

Daniel said...

Good job on fake background scaling there. 2 notes:
- the center PNG can be just 1 pixel wide, as opposed to 3x3.
- here's to hoping that the shadow in the future will actually be drawn by plasma or compositor, instead of being part of the packground pngs. Roll-your-own shadow was an annoying visual problem in SK, and I really hope Plasma moves forward on that one.

Bernhard said...

wow.. looks great.. you've done really great work!

the only thing i wonder about: every plasmoid has got settings.. will the backgroundcolor or any color be customizable?

with friendly greetings
bernhard

Tom said...

bernhard, what would be even better is if the colour was sensitive to the background of your desktop, or at least if you could change the settings across all the plasmoids at once. Otherwise it will be a fuss when you change from the black 'discover KDE' background to a nice verdant green photo or a bright white image.

Good stuff, though.

Aaron J. Seigo said...

@daniel:

> the center PNG can be just 1 pixel wide, as opposed to 3x3.

it's not actually a png. in fact, i'd prefer it themes would provide the center as a svn, perhaps with a subtle gradient. when it's resized, that gradient will scale up properly if it is svg data rather than png.

mixing bitmaps and scalable stuff, runtime manip of each ...svg is so cool =)

> shadow in the future will actually be
> drawn by plasma or compositor

plasma is the compositor (well, qt's drawing system which plasma uses is). that said, yes, i'd like to see both the shadow and the blur be added programmatically.

@bernhard: i really would like to see backgrounds and other common elements remain consistent. applets should create innovative or attractive looks based on their contents rather than their borders.

the idea comes from industrial design and the concept of unified design across a product line category. the iPod accessory universe is a really good contemporary example of that.

@tom: "if the colour was sensitive to the background"

perhaps someday =)

"at least if you could change the settings across all the plasmoids at once"

that's already possible and one the central concepts in the theme system design.