From kde-core-devel Tue Dec 07 21:19:21 2004 From: Alexander Neundorf Date: Tue, 07 Dec 2004 21:19:21 +0000 To: kde-core-devel Subject: Re: [patch] shade sorted column in KListView Message-Id: <200412072219.21005.neundorf () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110245437601066 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@jenoptik.com - http://www.jenoptik-los.de Home: neundorf@kde.org - http://www.kde.org alex@neundorf.net - http://www.neundorf.net