From b32a19ff7aa3c77a880f31a51e4e5952a5b153c1 Mon Sep 17 00:00:00 2001 From: Vadim Shpakovski Date: Wed, 25 Dec 2013 18:00:14 +0200 Subject: Adding support for custom drawing. --- MASShortcutView.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MASShortcutView.m b/MASShortcutView.m index 386584f..ba28e47 100644 --- a/MASShortcutView.m +++ b/MASShortcutView.m @@ -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; -- cgit v1.2.3