KDE/kdeplasma-addons/applets/news

Sebastian Kügler sebas at kde.org
Mon Aug 3 16:05:10 CEST 2009


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 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?
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090803/260be9d1/attachment.sig 


More information about the Plasma-devel mailing list