[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Plasma::Stylesheet?
From:       Marco Martin <notmart () gmail ! com>
Date:       2010-05-06 13:27:54
Message-ID: 201005061527.54553.notmart () gmail ! com
[Download RAW message or body]

On Thursday 06 May 2010, Sebastian Kügler wrote:
> Hey,
> 
> I'd like to get in my work on stylesheet support in Plasma, before the
> feature freeze on May, 11th.
> 
> Right now, Stylesheet is a standalone class that give you a QString
> stylesheet() that uses Plasma::Theme's colouring and font sizing. This is
> useful basically whenever you want to use non-trivial HTML in your applet
> (or other Plasma code).
> 
> During Tokamak4, Aaron and I sat together to discuss how we want this in
> Plasma and we came to the preliminary conclusion that it'd best be added
> as a method to Plasma::Theme, so you basically get QString
> Plasma::Theme::stylesheet().
> 
> Thinking about this, it might be too limited, as I'd like to support custom
> stylesheets as well, basically what I have in mind is:

a way would be with simple string replacement so QStrig 
Plasma::Theme::processStyleSheet(QString)

the input would be like "color: #plasma-textcolor; background: #plasma-
buttoncolor" then those #plasma-foo would be replaced with proper colors.
then on the slot reacting to themeChanged you do again webwidget-
>setStyleSheet(Plasma::Theme::processStyleSheet(rawString));

it's not super pretty, but the class works in this way as well, is just more 
contained in a single object.

Cheers,
Marco Martin
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic