-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathAOSegmentedControl.m
More file actions
35 lines (27 loc) · 814 Bytes
/
AOSegmentedControl.m
File metadata and controls
35 lines (27 loc) · 814 Bytes
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
//
// AOSegmentedControl.m
// FormulatePro
//
// Created by Andrew de los Reyes on 8/15/06.
// Copyright 2006 Andrew de los Reyes. All rights reserved.
//
#import "AOSegmentedControl.h"
#define NSSegmentedCellAquaStyle 1 // Like the tabs in an NSTabView.
#define NSSegmentedCellMetalStyle 2 // Like the Safari and Finder buttons.
@interface NSSegmentedCell ( Private )
- (void)_setSegmentedCellStyle:(int)style;
@end
@implementation AOSegmentedControl
- (void)awakeFromNib
{
// 26 is the height of normal-sized segmented control:
[self setFrameSize:NSMakeSize([self frame].size.width, 26)];
}
- (NSCell *)cell
{
NSSegmentedCell *cell = [super cell];
//[cell setControlSize:NSRegularControlSize];
[cell _setSegmentedCellStyle:NSSegmentedCellMetalStyle];
return cell;
}
@end