mirror of
https://github.com/transmission/transmission
synced 2024-12-25 17:17:31 +00:00
don't draw the white rows - this is already performed before hand
This commit is contained in:
parent
53d8574b11
commit
793d5bc2b6
2 changed files with 22 additions and 14 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue