summaryrefslogtreecommitdiffstats
path: root/macosx/HBHUDView.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2015-11-03 09:59:35 +0100
committerDamiano Galassi <[email protected]>2015-11-03 09:59:35 +0100
commit10cb64d1dc4c4572b8496ead471fc22ca98289e6 (patch)
treeb2bef36267107cba09fe3cee79a29146823947ea /macosx/HBHUDView.m
parentc518c56098354c7e953d4c2397970245046520df (diff)
MacGui: remove a compatibility workaroud for the 10.9 sdk.
Diffstat (limited to 'macosx/HBHUDView.m')
-rw-r--r--macosx/HBHUDView.m22
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