1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00
transmission/macosx/ActionPopUpButton.m
2007-01-02 19:51:02 +00:00

24 lines
664 B
Objective-C

#import "ActionPopUpButton.h"
@implementation ActionPopUpButton
- (id) initWithCoder: (NSCoder *) coder
{
if ((self = [super initWithCoder: coder]))
{
fImage = [NSImage imageNamed: @"ActionButton.png"];
[fImage setFlipped: YES];
fImagePressed = [NSImage imageNamed: @"ActionButtonPressed.png"];
[fImagePressed setFlipped: YES];
}
return self;
}
- (void) drawRect: (NSRect) rect
{
NSImage * image = [[self cell] isHighlighted] ? fImagePressed : fImage;
[image drawInRect: rect fromRect: NSMakeRect(0.0, 0.0, [image size].width, [image size].height)
operation: NSCompositeSourceOver fraction: 1.0];
}
@end