don't draw the white rows - this is already performed before hand

This commit is contained in:
Mitchell Livingston 2008-05-23 20:18:14 +00:00
parent 53d8574b11
commit 793d5bc2b6
2 changed files with 22 additions and 14 deletions

View File

@ -701,7 +701,7 @@
//alternating rows - first row after group row is white
- (void) highlightSelectionInClipRect: (NSRect) clipRect
{
NSArray * colors = [NSColor controlAlternatingRowBackgroundColors];
NSColor * altColor = [[NSColor controlAlternatingRowBackgroundColors] objectAtIndex: 1];
NSRect visibleRect = clipRect;
NSRange rows = [self rowsInRect: visibleRect];
@ -735,9 +735,11 @@
continue;
}
NSColor * color = start ? [colors objectAtIndex: 0] : [colors objectAtIndex: 1];
[color set];
NSRectFill([self rectOfRow: i]);
if (!start)
{
[altColor set];
NSRectFill([self rectOfRow: i]);
}
start = !start;
}
@ -753,9 +755,11 @@
while (rowRect.origin.y < NSMaxY(visibleRect))
{
NSColor * color = start ? [colors objectAtIndex: 0] : [colors objectAtIndex: 1];
[color set];
NSRectFill(rowRect);
if (!start)
{
[altColor set];
NSRectFill(rowRect);
}
start = !start;
rowRect.origin.y += rowRect.size.height;

View File

@ -34,7 +34,7 @@
//alternating rows - first row after group row is white
- (void) highlightSelectionInClipRect: (NSRect) clipRect
{
NSArray * colors = [NSColor controlAlternatingRowBackgroundColors];
NSColor * altColor = [[NSColor controlAlternatingRowBackgroundColors] objectAtIndex: 1];
NSRect visibleRect = clipRect;
NSRange rows = [self rowsInRect: visibleRect];
@ -68,9 +68,11 @@
continue;
}
NSColor * color = start ? [colors objectAtIndex: 0] : [colors objectAtIndex: 1];
[color set];
NSRectFill([self rectOfRow: i]);
if (!start)
{
[altColor set];
NSRectFill([self rectOfRow: i]);
}
start = !start;
}
@ -86,9 +88,11 @@
while (rowRect.origin.y < NSMaxY(visibleRect))
{
NSColor * color = start ? [colors objectAtIndex: 0] : [colors objectAtIndex: 1];
[color set];
NSRectFill(rowRect);
if (!start)
{
[altColor set];
NSRectFill(rowRect);
}
start = !start;
rowRect.origin.y += rowRect.size.height;