[patch] kstyle issue with gradient brushes

Olivier Goffart ogoffart at kde.org
Tue Jul 14 23:36:36 BST 2009


Le Tuesday 14 July 2009, Fred Emmott a écrit :
> Hi,
>
> In one of my models, I have the following code:
>
>                 case Qt::BackgroundRole:
>                         {
>                                 QLinearGradient gradient;
>                                 gradient.setColorAt(0, Qt::white);
>                                 gradient.setColorAt(1, Qt::gray);
>                                 gradient.setStart(0, 0);
>                                 gradient.setFinalStop(0, 36); // 36 is a
> temporarily hardcoded value, the same as my row heights
>                                 return static_cast<QBrush>(gradient);
>                         }
>
> Under Qt styles, such as Plastique (although, works also with phase,
> windows, motif, cleanlook, GTK, CDE) this renders as expected:
>
> http://files.fredemmott.co.uk/kstyle-brush-origin/plastique.png
>
> Under styles inheriting from kstyle, such as oxygen, it doesn't:
>
> http://files.fredemmott.co.uk/kstyle-brush-origin/oxygen.png
>
> Patch against 4.2.4 (sorry, my connection's sucking, that's all I've got at
> the moment - appears unresolved in trunk):
>
> http://files.fredemmott.co.uk/kstyle-brush-origin/kstyle.diff

Looks fine, you can commit in trunk and 4.3






More information about the kde-core-devel mailing list