diff options
author | Damiano Galassi <[email protected]> | 2018-06-08 16:59:25 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2018-06-08 16:59:25 +0200 |
commit | c762b2c0ec5b6fb58d1fd453e2b5aed526c6d693 (patch) | |
tree | e0ab43c5ddd28ed876158b689be0c93c2380d970 /macosx/HBHUDView.m | |
parent | de7355d5ad5257c4cce5e0a99fffb3ee58264ba0 (diff) |
MacGui: set the minimum deployment target to 10.10. Remove Growl and use macOS standard notifications. Remove deprecated API usage and code that doesn't compile anymore (QTKit).
Diffstat (limited to 'macosx/HBHUDView.m')
-rw-r--r-- | macosx/HBHUDView.m | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/macosx/HBHUDView.m b/macosx/HBHUDView.m index 1d6079d96..a03eb427a 100644 --- a/macosx/HBHUDView.m +++ b/macosx/HBHUDView.m @@ -6,10 +6,7 @@ #import "HBHUDView.h" -@interface HBHUDVisualEffectsView : NSVisualEffectView -@end - -@implementation HBHUDVisualEffectsView +@implementation HBHUDView - (instancetype)initWithFrame:(NSRect)frame { @@ -35,46 +32,3 @@ } @end - -@implementation HBHUDView - -- (instancetype)initWithFrame:(NSRect)frame -{ - if (NSClassFromString(@"NSVisualEffectView")) - { - // If NSVisualEffectView class is loaded - // release ourself and return a NSVisualEffectView instance instead. - self = (HBHUDView *)[[HBHUDVisualEffectsView alloc] initWithFrame:frame]; - } - else - { - self = [super initWithFrame:frame]; - } - - return self; -} - -- (BOOL)acceptsFirstResponder -{ - return YES; -} - -- (void)drawRect:(NSRect)dirtyRect -{ - NSGraphicsContext *theContext = [NSGraphicsContext currentContext]; - [theContext saveGraphicsState]; - - NSRect rect = NSMakeRect(0.0, 0.0, self.frame.size.width, self.frame.size.height); - - // Draw a standard HUD with black transparent background and white border. - [[NSColor colorWithCalibratedRed:0.0 green:0.0 blue:0.0 alpha:0.6] setFill]; - [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect, 1, 1) xRadius:14.0 yRadius:14.0] fill]; - - [[NSColor whiteColor] setStroke]; - [NSBezierPath setDefaultLineWidth:2.0]; - [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect, 1, 1) xRadius:14.0 yRadius:14.0] stroke]; - - [theContext restoreGraphicsState]; -} - -@end
\ No newline at end of file |