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

List:       kde-devel
Subject:    Re: Oxygen gradients and QStyle...
From:       Hugo Pereira Da Costa <hugo () oxygen-icons ! org>
Date:       2010-03-28 17:08:46
Message-ID: 4BAF8D1E.8090801 () oxygen-icons ! org
[Download RAW message or body]

Hi,

The complicated gradient used by oxygen is only applied to the main 
window, almost all other widgets (including toolbar and menubars) are 
"transparent".
For main windows, the gradient is actually rendered by re-implementing 
paint events into an event filter.
Long story short, you cannot access the gradient directly from a widget.
Only way to have QPainter render this gradient would be to duplicate the 
code (which I'm not sure you want to do, cause then it would not be 
portable accross styles) ...

Ideally, there might be a possibility to store the gradient in Window 
palettes brush (rather than re-implementing paintEvent), but I had not 
time to look into that yet ...

Hugo

> Hello,
>
> i'm trying to write oxygen style gradients to a painter with QStyle::draw*
> function but all toolbar/menubar/... widget return a flat widget with no
> gradient.
>
> I don't know how oxygen work, but how can i get this gradient ?
>
> Thanks,
> Cédric
>
>    
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe<<
>>>        

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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