Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 48 lines (35 sloc) 0.922 kb
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

@import "CPView.j"

@implementation _CPCornerView : CPView
{
}

- (void)_init
{
    [self setBackgroundColor:[CPColor colorWithPatternImage:CPAppKitImage("tableview-headerview.png", CGSizeMake(1.0, 23.0))]];
}

- (id)initWithFrame:(CGRect)aFrame
{
    if (self = [super initWithFrame:aFrame])
    {
        [self _init];
    }

    return self;
}

- (void)drawRect:(CGRect)aRect
{
    var context = [[CPGraphicsContext currentContext] graphicsPort];

    CGContextSetStrokeColor(context, [CPColor colorWithHexString:@"dce0e2"]);

    var points = [
                    CGPointMake(aRect.origin.x, aRect.origin.y + 0.5),
                    CGPointMake(aRect.origin.x, aRect.origin.y + aRect.size.height)
                 ];

    CGContextStrokeLineSegments(context, points, 2);
}

- (id)initWithCoder:(CPCoder)aCoder
{
    self = [super initWithCoder:aCoder];
    {
        [self _init];
    }

    return self;
}

@end
Something went wrong with that request. Please try again.