HistoryView: Add "SHA" Column and make it hidden by default
[GitX.git] / PBNiceSplitView.m
blob994e6d4c02361e89cf05e5dac6f2021fbbd7d0cb
1 //
2 //  PBNiceSplitView.m
3 //  GitX
4 //
5 //  Created by Pieter de Bie on 31-10-08.
6 //  Copyright 2008 Pieter de Bie. All rights reserved.
7 //
9 #import "PBNiceSplitView.h"
11 static NSImage *bar;
12 static NSImage *grip;
14 @implementation PBNiceSplitView
16 +(void) initialize
18         NSString *barPath = [[NSBundle mainBundle] pathForResource:@"mainSplitterBar" ofType:@"tiff"];
19         bar = [[NSImage alloc] initWithContentsOfFile: barPath];
20         [bar setFlipped: YES];
22         NSString *gripPath = [[NSBundle mainBundle] pathForResource:@"mainSplitterDimple" ofType:@"tiff"];
23         grip = [[NSImage alloc] initWithContentsOfFile: gripPath];
24         [grip setFlipped: YES];
27 - (void)drawDividerInRect:(NSRect)aRect
29         // Draw bar and grip onto the canvas
30         NSRect gripRect = aRect;
31         gripRect.origin.x = (NSMidX(aRect) - ([grip size].width/2));
32         gripRect.size.width = 8;
33         
34         [self lockFocus];
35         [bar drawInRect:aRect fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
36         [grip drawInRect:gripRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
37         [self unlockFocus];
40 - (CGFloat)dividerThickness
42         return 10.0;
45 @end