From 10cb64d1dc4c4572b8496ead471fc22ca98289e6 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Tue, 3 Nov 2015 09:59:35 +0100 Subject: MacGui: remove a compatibility workaroud for the 10.9 sdk. --- macosx/HBHUDView.m | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/macosx/HBHUDView.m b/macosx/HBHUDView.m index a183faf8e..e4030f743 100644 --- a/macosx/HBHUDView.m +++ b/macosx/HBHUDView.m @@ -6,28 +6,18 @@ #import "HBHUDView.h" -@interface NSView (HBHUDViewExtension) - -- (void)setBlendingMode:(int)mode; -- (void)setMaterial:(int)material; -- (void)setState:(int)state; - -@end - @implementation HBHUDView -+ (void)setupNewStyleHUD:(NSView *)view ++ (void)setupNewStyleHUD:(NSVisualEffectView *)view { [view setWantsLayer:YES]; [view.layer setCornerRadius:4]; - // Hardcode the values so we can - // compile it with the 10.9 sdk. - [view setBlendingMode:1]; - [view setMaterial:2]; - [view setState:1]; + [view setBlendingMode:NSVisualEffectBlendingModeWithinWindow]; + [view setMaterial:NSVisualEffectMaterialDark]; + [view setState:NSVisualEffectStateActive]; - [view setAppearance:[NSClassFromString(@"NSAppearance") appearanceNamed:@"NSAppearanceNameVibrantDark"]]; + [view setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameVibrantDark]]; } - (void)drawRect:(NSRect)dirtyRect @@ -57,7 +47,7 @@ self = [[NSClassFromString(@"NSVisualEffectView") alloc] initWithFrame:frame]; if (self) { - [HBHUDView setupNewStyleHUD:self]; + [HBHUDView setupNewStyleHUD:(NSVisualEffectView *)self]; } } else -- cgit v1.2.3