theme idea

Casper (gmail) maninalift at googlemail.com
Fri Feb 27 23:32:52 CET 2009


On Tuesday 24 February 2009 19:50:32 Aaron J. Seigo wrote:
> hi all ..
>
> some users seem disturbed that plasma "looks different". while i think they
> are rather completely missing the point (which is "yes, the shell is meant
> to look different") it did get me thinking about things ...
>
> when a theme doesn't include a given widget svg, right now we fall back to
> the default theme. i wonder if it might be interesting to let themed Plasma
> widgets such as the pushbutton fall back instead to the application QStyle.
>
> this could be accomplished by simply not falling back to the default theme
> for these elements or (i think probably more safely?) by having an entry in
> the theme's .desktop file that says "use system widgets".
>
> then in widgets like PushButton the paint method could check for which way
> the theme wants to go and use the normal QGraphicsProxyWidget's paint
> method in that case.
>
> thoughts?

I had been thinking about taking a completely different tac o the same 
problem. What to do when X widget is not implemented in Y theme. It would take 
significantly more work and be more disruptive but produce more visually 
consistent results... more consistent though not necessarily more elegant.

Just as happens at the moment, every widget or element that requests a a 
themed svg can fall-back to a default svg implementation. Where my recipe 
diverges is that the default svg should be constructed from basic elements 
that are provided by each theme (line style, background fill style, hi-light 
fill style... ).

So where a specific SVG for a given theme a new one is created by parsing the 
default implementation and replacing the "basic elements" with those provided 
by the theme. Essentially doing what plasma does already with smaller 
elements. The result should fit with the theme, though be less polished than a 
hand-crafted svg.

I think this could make both theme creation and widget creation easier, and 
the intersection of the clearer, but as I say it would be very disruptive and 
take some thinking. Also, it would require theme-creators to deal with more-
abstract elements which might be counter  to the idea of artists don't have to 
be programmer. 

Still, I thought I'd mention it anyway.

Casper


More information about the Plasma-devel mailing list