Changeset 5925 for trunk/macosx/TorrentTableView.m
- Timestamp:
- May 23, 2008, 8:36:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/TorrentTableView.m
r5923 r5925 703 703 { 704 704 NSColor * altColor = [[NSColor controlAlternatingRowBackgroundColors] objectAtIndex: 1]; 705 [altColor set]; 705 706 706 707 NSRect visibleRect = clipRect; 707 708 NSRange rows = [self rowsInRect: visibleRect]; 708 709 BOOL start = YES; 710 int i; 709 711 710 712 if (rows.length > 0) 711 713 { 712 int i;713 714 714 //determine what the first row color should be 715 715 if ([[self itemAtRow: rows.location] isKindOfClass: [Torrent class]]) … … 737 737 738 738 if (!start) 739 {740 [altColor set];741 739 NSRectFill([self rectOfRow: i]); 742 }743 740 744 741 start = !start; … … 751 748 752 749 //remaining visible rows continue alternating 753 NSRect rowRect = visibleRect; 754 rowRect.size.height = [self rowHeight] + [self intercellSpacing].height; 755 756 while (rowRect.origin.y < NSMaxY(visibleRect)) 750 float height = [self rowHeight] + [self intercellSpacing].height; 751 int numberOfRects = ceil(visibleRect.size.height / height); 752 visibleRect.size.height = height; 753 754 for (i=0; i<numberOfRects; i++) 757 755 { 758 756 if (!start) 759 { 760 [altColor set]; 761 NSRectFill(rowRect); 762 } 757 NSRectFill(visibleRect); 763 758 764 759 start = !start; 765 rowRect.origin.y += rowRect.size.height;760 visibleRect.origin.y += height; 766 761 } 767 762
Note: See TracChangeset
for help on using the changeset viewer.