Stylesheets and plasma widgets

Aaron J. Seigo aseigo at
Fri Sep 11 18:37:04 CEST 2009

On September 11, 2009, Marco Martin wrote:
> On Friday 11 September 2009, Aaron J. Seigo wrote:
> > On September 10, 2009, alan moore wrote:
> > > Thanks; I tried this, but it didn't work (or else I'm doing it wrong).
> >
> > looking at Plasma::PushButton, it doesn't allow setting the font
> > directly. it uses the theme's font. it should probably not do so if a
> > font is set (e.g. receives a FontChange event).. so some work needed in
> > libplasma
> yeah, i'm not too happy about font and colors management in plasma..
> for fonts, now we have:
> -Plasma::Theme::font(type)
> -nativeWidget()->font()
> -QGraphicsWidget::font();

for our widgets that paint their own UI, e.g. pushbuttons, they should 
probably default to Plasma::Theme::font (which itself defaults back to the 
desktop defaults) and use QGraphicsWidget::font() if it has been explicitly 
set. nativeWidget()->font() can probably be ignored unless we're painting 
"native" style.

what do you think?

> now, i'm not sure if QGraphicsProxyWidget::font() is syncronized with
> nativeWidget()->font(),

afaik it is not.

> but it should be used the one from plasma::teme
>  unless a font is set, but is it possible at all to know if a non default
>  font was set?

probably by watching for FontChanged events. see the docu for 

Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : 

More information about the Plasma-devel mailing list