#define OSX_EL_CAPITAN (NSAppKitVersionNumber >= 1404 && NSAppKitVersionNumber < 1485)
#define OSX_SIERRA (NSAppKitVersionNumber >= 1485)
+#define OSX_YOSEMITE_OR_HIGHER (NSAppKitVersionNumber >= 1334)
+
// Sierra only APIs
#ifndef MAC_OS_X_VERSION_10_12
#import "VLCFSPanelController.h"
#import "VLCCoreInteraction.h"
+#import "CompatibilityFixes.h"
#import "VLCMain.h"
@interface VLCFSPanelController () {
[self.window setStyleMask:self.window.styleMask | NSResizableWindowMask];
[self.window setBackgroundColor:[NSColor clearColor]];
+#ifdef MAC_OS_X_VERSION_10_10
/* Inject correct background view depending on OS support */
- [self injectVisualEffectView];
- //[self injectBackgroundView];
+ if (OSX_YOSEMITE_OR_HIGHER) {
+ [self injectVisualEffectView];
+ } else {
+ [self injectBackgroundView];
+ }
+#else
+ /* Compiled with old SDK, always use legacy style */
+ [self injectBackgroundView];
+#endif
[(NSButtonCell*)[_playPauseButton cell] setHighlightsBy:NSPushInCellMask];
[(NSButtonCell*)[_playPauseButton cell] setShowsStateBy:NSContentsCellMask];
#pragma mark -
#pragma mark Helpers
+#ifdef MAC_OS_X_VERSION_10_10
/**
Create an image mask for the NSVisualEffectView
with rounded corners in the given rect
[_controllsView setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameVibrantDark]];
[self.window.contentView addSubview:_controllsView];
}
+#endif
/**
Injects the standard background view in the Windows view hierarchy