From 793d5bc2b67fce4a360e6146d469b4312c600b0a Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Fri, 23 May 2008 20:18:14 +0000 Subject: [PATCH] don't draw the white rows - this is already performed before hand --- macosx/TorrentTableView.m | 18 +++++++++++------- macosx/TrackerTableView.m | 18 +++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index a27089ea1..95d4934f9 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -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; diff --git a/macosx/TrackerTableView.m b/macosx/TrackerTableView.m index f6a616b8b..388d21dc5 100644 --- a/macosx/TrackerTableView.m +++ b/macosx/TrackerTableView.m @@ -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;