[patch] shade sorted column in KListView

Alexander Neundorf neundorf at kde.org
Tue Dec 7 21:19:21 GMT 2004


On Tuesday 07 December 2004 22:01, Martin Koller wrote:
...
> If you invert back/alternating, it will give different results, which would
> make a problem when the background color is white (lighter than white is
> not possible).
> I think I found a good solution (it's similar to what the
> calculateAlternateBackgroundColor() method in kglobalsettings does).
>
> See attached patch.
>
> If there are no objections to the rest of the code, I would commit this
> tomorrow.

Am I right that backGroundColor() is called for every cell of the listview ?
How about the performance impact ?
It adds at one function call to each paintCell() everywhere in KDE where a 
KListView is used. How expensive are the color conversions ? hsv(), dark(), 
light() ? Could this be calculated once when the colors are set and the 
results stored so that they are only reused in paintCell() ?

Bye
Alex
-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list