[patch] shade sorted column in KListView
Martin Koller
m.koller at surfeu.at
Tue Dec 7 21:42:54 GMT 2004
On Tuesday 07 December 2004 22:19, Alexander Neundorf wrote:
> 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() ?
In fact the new function does nearly the same as the other backgroundColor()
which was used before in paintCell.
The calculation for the different color is only triggered for the cells in the
sorted column (which are currently visible).
The dark() and light() calculations are rather inexpensive, as they only do a
multiplication/division.
Also some mult/divs in hsv().
I did not see a performance loss.
> Could this be calculated once when the colors are set and the
> results stored so that they are only reused in paintCell() ?
Could be done, but I really don't think this is necessary here.
--
Best regards/Schöne Grüße
Martin () ascii ribbon campaign - against html mail
/\ - against microsoft attachments
Some operating systems are called 'user friendly',
Linux however is 'expert friendly'.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041207/b9ccad17/attachment.sig>
More information about the kde-core-devel
mailing list