diff options
author | Damiano Galassi <damiog@gmail.com> | 2015-11-03 09:59:35 +0100 |
---|---|---|
committer | Damiano Galassi <damiog@gmail.com> | 2015-11-03 09:59:35 +0100 |
commit | 10cb64d1dc4c4572b8496ead471fc22ca98289e6 (patch) | |
tree | b2bef36267107cba09fe3cee79a29146823947ea /macosx | |
parent | c518c56098354c7e953d4c2397970245046520df (diff) |
MacGui: remove a compatibility workaroud for the 10.9 sdk.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBHUDView.m | 22 |
1 files 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 |