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 / AISearchFieldCell.m

//
//  AISearchFieldCell.m
//  Adium
//
//  Created by Evan Schoenberg on 5/1/08.
//

#import "AISearchFieldCell.h"
#import <AIUtilities/AIBezierPathAdditions.h>
#import <AIUtilities/AIApplicationAdditions.h>

@implementation AISearchFieldCell

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

- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
        if (backgroundColor) {
                [backgroundColor setFill];
                [[NSBezierPath bezierPathWithRoundedRect:cellFrame] fill];
        }

        [super drawInteriorWithFrame:cellFrame inView:controlView];
}

- (void)setTextColor:(NSColor *)inTextColor backgroundColor:(NSColor *)inBackgroundColor
{
        NSSearchField   *searchField = (NSSearchField *)[self controlView];

        [searchField setTextColor:(inTextColor ? inTextColor : [NSColor blackColor])];

        if (backgroundColor != inBackgroundColor) {
                [backgroundColor release];
                backgroundColor = [inBackgroundColor retain];
        }
}

@end