diff options
Diffstat (limited to 'MASShortcutView.m')
| -rw-r--r-- | MASShortcutView.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/MASShortcutView.m b/MASShortcutView.m index b2d2531..dd75729 100644 --- a/MASShortcutView.m +++ b/MASShortcutView.m @@ -107,6 +107,12 @@ _shortcutCell.bezelStyle = NSRoundedBezelStyle; break; } + case MASShortcutViewAppearanceFlat: { + self.wantsLayer = YES; + _shortcutCell.backgroundColor = [NSColor clearColor]; + _shortcutCell.bordered = NO; + break; + } } } @@ -176,6 +182,10 @@ [_shortcutCell drawWithFrame:CGRectOffset(frame, 0.0, 1.0) inView:self]; break; } + case MASShortcutViewAppearanceFlat: { + [_shortcutCell drawWithFrame:frame inView:self]; + break; + } } } @@ -227,6 +237,7 @@ switch (self.appearance) { case MASShortcutViewAppearanceTexturedRect: hintButtonWidth += 2.0; break; case MASShortcutViewAppearanceRounded: hintButtonWidth += 3.0; break; + case MASShortcutViewAppearanceFlat: hintButtonWidth -= 8.0 - (_shortcutCell.font.pointSize - BUTTON_FONT_SIZE); break; default: break; } CGRectDivide(self.bounds, &hintRect, &shortcutRect, hintButtonWidth, CGRectMaxXEdge); |
