-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPBGSeparatorCell.m
38 lines (29 loc) · 982 Bytes
/
PBGSeparatorCell.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
//
// PGSeparatorCell.m
// Neurosis
//
// Created by Patrick B. Gibson on 03/04/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "PBGSeparatorCell.h"
@implementation PBGSeparatorCell
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
{
// draw the separator
CGFloat lineWidth = cellFrame.size.width;
CGFloat lineX = 0;
CGFloat lineY = (cellFrame.size.height - 2) / 2;
lineY += 0.5;
[[NSColor colorWithDeviceRed:.349 green:.6 blue:.898 alpha:0.6] set];
NSRectFill(NSMakeRect(cellFrame.origin.x + lineX, cellFrame.origin.y + lineY, lineWidth, 1));
[[NSColor colorWithDeviceRed:1.976 green:2.0 blue:2.0 alpha:1.0] set];
NSRectFill(NSMakeRect(cellFrame.origin.x + lineX, cellFrame.origin.y + lineY + 1, lineWidth, 1));
}
- (void)selectWithFrame:(NSRect)aRect inView:(NSView*)controlView editor:(NSText*)textObj delegate:(id)anObject start:(int)selStart length:(int)selLength
{
}
- (BOOL)isSelectable
{
return NO;
}
@end