KDE/kdeplasma-addons/applets/news

Marco Martin notmart at gmail.com
Mon Aug 3 18:47:25 CEST 2009


On Monday 03 August 2009, Sebastian Kügler wrote:
> On Monday 03 August 2009 14:39:16 Marco Martin wrote:
> > SVN commit 1006289 by mart:
> >
> > keep the stylesheet, not strictly necessary after all but a good example
> > on how to do that
> >
> >
> >  A             news.css
>
> I've experimented with stylesheets and themes. My conclusion is that the
> stylesheet is theme-dependant. One solution I found was to write a

yes, in fact the notes stylesheet is just looked in the current theme folder 
without a fallback to default

> stylesheet with placeholders for colours and replace those placeholder with
> elementes from the theme. It's not really complete (just serves my
> purpose), but probably worth looking at. Maybe also worth considering
> adding something like this to Plasma::Theme.
>
> Observations:
>
> - not all widgets understand all features of stylesheets (Plasma::Label
> doesn't respect the link colours, for example, webkit does). As a result,
> it might or might now work in the UI.
>
> - the ability to just edit the stylesheet and see results immediately. (In
>   stylesheet.cpp, I'm watching the css file for changes and update the UI
>   accordingly.) Makes for a better nice workflow with short feedback cycles
> compared to editing the look in the .cpp file, or reloading the plasmoid
> manually.
>
> Code is at http://websvn.kde.org/trunk/KDE/kdeplasma-
> addons/applets/opendesktop/stylesheet.cpp?view=markup (remove the
> linebreak).
>
> Thoughts?

i like this class, i wonder if it would make sense in libplasma?
i don't see stylesheet much used around, and probably is better to not use 
them in simple widget, sticking instead to the default appearance or setting 
the qpalette at best..

however everywhere Webview or a TextBrowser is used yes, using a stylesheet is 
often necessary, now the question is: have we enough use cases to justify to 
add this symbol in libplasma? i'm not really sure, but as i said i think the 
thing is quite well done

Cheers,
Marco Martin


More information about the Plasma-devel mailing list