Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9edbf670f5 | |||
| b32a19ff7a |
@@ -14,4 +14,7 @@ typedef enum {
|
||||
@property (nonatomic, copy) void (^shortcutValueChange)(MASShortcutView *sender);
|
||||
@property (nonatomic) MASShortcutViewAppearance appearance;
|
||||
|
||||
/// Returns custom class for drawing control.
|
||||
+ (Class)shortcutCellClass;
|
||||
|
||||
@end
|
||||
|
||||
+6
-1
@@ -33,11 +33,16 @@
|
||||
|
||||
#pragma mark -
|
||||
|
||||
+ (Class)shortcutCellClass
|
||||
{
|
||||
return [NSButtonCell class];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)frameRect
|
||||
{
|
||||
self = [super initWithFrame:frameRect];
|
||||
if (self) {
|
||||
_shortcutCell = [[NSButtonCell alloc] init];
|
||||
_shortcutCell = [[[self.class shortcutCellClass] alloc] init];
|
||||
_shortcutCell.buttonType = NSPushOnPushOffButton;
|
||||
_shortcutCell.font = [[NSFontManager sharedFontManager] convertFont:_shortcutCell.font toSize:BUTTON_FONT_SIZE];
|
||||
_enabled = YES;
|
||||
|
||||
Reference in New Issue
Block a user