source: trunk/macosx/ActionPopUpButtonCell.m @ 1310

Last change on this file since 1310 was 1310, checked in by livings124, 15 years ago

typo caused pressed action button to be flipped

File size: 755 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        [fImagePressed 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.