William Bowling is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

wbowling / adium (fork of adium / adium)

Fork of Adium for patches/improvements

Clone this repository (size: 338.7 MB): HTTPS / SSH
hg clone https://bitbucket.org/wbowling/adium
hg clone ssh://hg@bitbucket.org/wbowling/adium

adium / Source / AIMessageTabSplitView.m

//
//  AIMessageTabSplitView.m
//  Adium
//
//  Created by Evan Schoenberg on 4/9/07.
//

#import "AIMessageTabSplitView.h"
#import <PSMTabBarControl/NSBezierPath_AMShading.h>

@implementation AIMessageTabSplitView

- (void)dealloc
{
        [leftColor release];
        [rightColor release];
        [super dealloc];
}

- (void)setLeftColor:(NSColor *)inLeftColor rightColor:(NSColor *)inRightColor
{
        if (leftColor != inLeftColor) {
                [leftColor release];
                leftColor = [inLeftColor retain];
        }

        if (rightColor != inRightColor) {
                [rightColor release];
                rightColor = [inRightColor retain];
        }
        
        [self setNeedsDisplay:YES];
}

-(void)drawDividerInRect:(NSRect)aRect
{       
        if (rightColor && leftColor) {
                NSBezierPath *path = [NSBezierPath bezierPathWithRect:aRect];
                [path linearVerticalGradientFillWithStartColor:leftColor 
                                                                                          endColor:rightColor];
        } else {
                [super drawDividerInRect:aRect];
        }
}

@end