Use initialize, not load, wherever possible.
[adiumx.git] / Source / AIMessageTabSplitView.m
blob872d1700a20af8faf37770572a853747bc713a31
1 //
2 //  AIMessageTabSplitView.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 4/9/07.
6 //
8 #import "AIMessageTabSplitView.h"
9 #import <PSMTabBarControl/NSBezierPath_AMShading.h>
11 @implementation AIMessageTabSplitView
13 - (void)dealloc
15         [leftColor release];
16         [rightColor release];
17         [super dealloc];
20 - (void)setLeftColor:(NSColor *)inLeftColor rightColor:(NSColor *)inRightColor
22         if (leftColor != inLeftColor) {
23                 [leftColor release];
24                 leftColor = [inLeftColor retain];
25         }
27         if (rightColor != inRightColor) {
28                 [rightColor release];
29                 rightColor = [inRightColor retain];
30         }
31         
32         [self setNeedsDisplay:YES];
35 -(void)drawDividerInRect:(NSRect)aRect
36 {       
37         if (rightColor && leftColor) {
38                 NSBezierPath *path = [NSBezierPath bezierPathWithRect:aRect];
39                 [path linearVerticalGradientFillWithStartColor:leftColor 
40                                                                                           endColor:rightColor];
41         } else {
42                 [super drawDividerInRect:aRect];
43         }
46 @end