TwoTerm/Views/ColorView.m
Kelvin Sherlock eede1abbca update titlebar
git-svn-id: svn://qnap.local/TwoTerm/branches/frameless@2341 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
2011-12-23 20:35:00 +00:00

36 lines
536 B
Objective-C

//
// ColorView.m
// 2Term
//
// Created by Kelvin Sherlock on 12/20/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "ColorView.h"
@implementation ColorView
@synthesize color = _color;
- (void)drawRect:(NSRect)dirtyRect
{
[_color setFill];
NSRectFill(dirtyRect);
}
-(void)setColor:(NSColor *)color
{
if (_color == color) return;
[_color release];
_color = [color retain];
[self setNeedsDisplay: YES];
}
-(void)dealloc
{
[_color release];
[super dealloc];
}
@end