Review Request: Use QLinearGradient in KGradientSelector
    Christoph Feck 
    christoph at maxiom.de
       
    Mon Apr 12 02:07:18 BST 2010
    
    
  
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3565/
-----------------------------------------------------------
(Updated 2010-04-12 01:07:18.607637)
Review request for kdelibs.
Changes
-------
* actually use a QLinearGradient in the private data, so that arbitrary gradients can be rendered (note that QLinearGradient initializes to black->white, so init() no longer needed)
* added two new public functions to set/get the QGradientStops.
* use QBrush::isOpaque() to decide if gradient has alpha
* fixed bad contrast of texts when two similar colors are used
Summary
-------
Apparently, the old code comes from Qt 3 times, where no gradients where available. Additionally, the code allows transparent colors in the gradient, and draws them over a black/white chessboard pattern. I need this for alpha support KColorDialog (will prepare a separate review request for that).
Diffs (updated)
-----
  /trunk/KDE/kdelibs/kdeui/widgets/kselector.h 1113786 
  /trunk/KDE/kdelibs/kdeui/widgets/kselector.cpp 1113786 
Diff: http://reviewboard.kde.org/r/3565/diff
Testing
-------
Compiles and works. It should be faster also, but I did not make any benchmark.
Thanks,
Christoph
    
    
More information about the kde-core-devel
mailing list