sjPlot / macwidgets

Automatically exported from code.google.com/p/macwidgets
0 stars 0 forks source link

Alternating row colors in ITunesTable can appear messed up #167

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sometimes the alternating row color in the iTunesTableUI does not work when the 
table is empty. The area used by columns starts with blue, the unused area to 
the right of the last column starts with white (see attached snapshot).

Original issue reported on code.google.com by dlemmermann@gmail.com on 14 Aug 2010 at 2:35

Attachments:

GoogleCodeExporter commented 8 years ago
I noticed that this can be fixed by changing the code in the 
StripedViewportBorder class inside the paintStripedBackground() method. The 
calculation of topY is incorrect when a negative clip.y gets passed to it, 
which seems to happen when the table is empty and rowAtPoint returns -1. 

The fixed code looks like this:

        int topY = rowAtPoint < 0
                ? 0 // USED TO BE clip.y
                : fTable.getCellRect(rowAtPoint, 0, true).y - viewPosition.y;

Ken, please let me know if this looks like an OK fix to you. I will then commit 
this change.

Original comment by dlemmermann@gmail.com on 14 Aug 2010 at 2:37

GoogleCodeExporter commented 8 years ago
Ken didn´t object, so I commited it :-)

Original comment by dlemmermann@gmail.com on 27 Aug 2010 at 1:48