-
Notifications
You must be signed in to change notification settings - Fork 1
/
EtchedPopUpButton.m
43 lines (32 loc) · 1 KB
/
EtchedPopUpButton.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* EtchedPopUpButton */
// NOTE TO SELF: where did this come from?
#import <SproutedInterface/EtchedPopUpButton.h>
#import <SproutedInterface/EtchedPopUpButtonCell.h>
@implementation EtchedPopUpButton
+ (Class)cellClass
{
return [EtchedPopUpButtonCell class];
}
- initWithCoder: (NSCoder *)origCoder
{
if(![origCoder isKindOfClass: [NSKeyedUnarchiver class]]){
self = [super initWithCoder: origCoder];
} else {
NSKeyedUnarchiver *coder = (id)origCoder;
NSString *oldClassName = [[[self superclass] cellClass] className];
Class oldClass = [coder classForClassName: oldClassName];
if(!oldClass)
oldClass = [[super superclass] cellClass];
[coder setClass: [[self class] cellClass] forClassName: oldClassName];
self = [super initWithCoder: coder];
[coder setClass: oldClass forClassName: oldClassName];
[self setShadowColor:[NSColor whiteColor]];
}
return self;
}
-(void)setShadowColor:(NSColor *)color
{
EtchedPopUpButtonCell *cell = [self cell];
[cell setShadowColor:color];
}
@end