-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathPRAlbumTableView.m
51 lines (47 loc) · 2.18 KB
/
PRAlbumTableView.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#import "PRAlbumTableView.h"
#import "PRAlbumListViewController.h"
@implementation PRAlbumTableView
//- (void)drawGridInClipRect:(NSRect)rect {
// NSRange columnRange = [self rowsInRect:rect];
// [[NSColor gridColor] set];
// [NSBezierPath setDefaultLineWidth:0];
// for (int i = columnRange.location; i < NSMaxRange(columnRange); i++) {
// if ([(PRAlbumListViewController *)[self delegate] shouldDrawGridForRow:i tableView:self]) {
// NSRect colRect = [self rectOfRow:i];
// NSPoint startPoint = NSMakePoint(colRect.origin.x, colRect.origin.y + colRect.size.height - 0.5);
// NSPoint endPoint = NSMakePoint(colRect.origin.x + colRect.size.width, colRect.origin.y + colRect.size.height - 0.5);
// [NSBezierPath strokeLineFromPoint:startPoint toPoint:endPoint];
// }
// }
//}
//
//- (void)highlightSelectionInClipRect:(NSRect)rect {
// NSRange visibleRowIndexes = [self rowsInRect:rect];
// NSIndexSet *selectedRowIndexes = [self selectedRowIndexes];
//
// // if the view is focused, use highlight color, otherwise use the out-of-focus highlight color
// if (self == [[self window] firstResponder] &&
// [[self window] isMainWindow] &&
// [[self window] isKeyWindow]) {
// [[NSColor colorWithCalibratedRed:59./255 green:128./255 blue:223./255 alpha:1.0] set];
// } else {
// [[NSColor secondarySelectedControlColor] set];
// }
//
// // draw highlight for the visible, selected rows
// int row = visibleRowIndexes.location;
// int endRow = row + visibleRowIndexes.length;
// for (; row < endRow; row++) {
// int actualRow = [(PRAlbumListViewController *)[self delegate] dbRowForTableRow:row];
// if ([selectedRowIndexes containsIndex:row] && actualRow != -1) {
// NSRect rectOfRow = [self rectOfRow:row];
// NSRect rowRect;
// rowRect.origin = rectOfRow.origin;
// rowRect.size.width = rectOfRow.size.width;
// rowRect.origin.y = rowRect.origin.y;
// rowRect.size.height = rectOfRow.size.height - 0.3;
// [[NSBezierPath bezierPathWithRect:rowRect] fill];
// }
// }
//}
@end