source: trunk/macosx/ActionPopUpButtonCell.m @ 1307

Last change on this file since 1307 was 1307, checked in by livings124, 16 years ago

Action menu's behavior should now mimic Mail.app's

File size: 748 bytes
Line 
1#import "ActionPopUpButtonCell.h"
2
3@implementation ActionPopUpButtonCell
4
5- (id) initTextCell: (NSString *) string pullsDown: (BOOL) pullDown
6{
7        if (self = [super initTextCell: string pullsDown: YES])
8    {
9        fImage = [NSImage imageNamed: @"ActionButton.png"];
10        [fImage setFlipped: YES];
11        fImagePressed = [NSImage imageNamed: @"ActionButtonPressed.png"];
12        [fImage setFlipped: YES];
13    }
14        return self;
15}
16
17- (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView
18{
19    NSImage * image = [self isHighlighted] ? fImagePressed : fImage;
20        [image drawInRect: cellFrame fromRect: NSMakeRect(0.0, 0.0, [image size].width, [image size].height)
21            operation: NSCompositeSourceOver fraction: 1.0];
22}
23
24@end
Note: See TracBrowser for help on using the repository browser.