mirror of https://code.videolan.org/videolan/vlc
macosx: restore compilation compatibility with SDK versions < 10.14
This commit is contained in:
parent
4e44bc66c9
commit
e3ea13c07c
|
@ -24,5 +24,15 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#pragma mark -
|
||||
void swapoutOverride(Class _Nonnull cls, SEL _Nonnull selector);
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_14
|
||||
|
||||
extern NSString *const NSAppearanceNameDarkAqua;
|
||||
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -43,3 +43,9 @@ void swapoutOverride(Class cls, SEL selector)
|
|||
if (subclassMeth && baseImp)
|
||||
method_setImplementation(subclassMeth, baseImp);
|
||||
}
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_14
|
||||
|
||||
NSString *const NSAppearanceNameDarkAqua = @"NSAppearanceNameDarkAqua";
|
||||
|
||||
#endif
|
||||
|
|
|
@ -74,19 +74,16 @@
|
|||
endingColor:[NSColor colorWithSRGBRed:0.82 green:0.82 blue:0.82 alpha:1.0]];
|
||||
_lightStroke = [NSColor colorWithSRGBRed:0.65 green:0.65 blue:0.65 alpha:1.0];
|
||||
|
||||
if (OSX_MOJAVE_AND_HIGHER) {
|
||||
if (@available(macOS 10.14, *)) {
|
||||
_darkGradient = [[NSGradient alloc] initWithStartingColor:[NSColor colorWithSRGBRed:0.27 green:0.27 blue:0.27 alpha:1.0]
|
||||
endingColor:[NSColor colorWithSRGBRed:0.22 green:0.22 blue:0.22 alpha:1.0]];
|
||||
_darkStroke = [NSColor colorWithSRGBRed:0.17 green:0.17 blue:0.18 alpha:1.0];
|
||||
[self viewDidChangeEffectiveAppearance];
|
||||
} else {
|
||||
_darkGradient = [[NSGradient alloc] initWithStartingColor:[NSColor colorWithSRGBRed:0.24 green:0.24 blue:0.24 alpha:1.0]
|
||||
endingColor:[NSColor colorWithSRGBRed:0.07 green:0.07 blue:0.07 alpha:1.0]];
|
||||
_darkStroke = [NSColor blackColor];
|
||||
}
|
||||
|
||||
if (@available(macOS 10.14, *)) {
|
||||
[self viewDidChangeEffectiveAppearance];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)calculatePaths
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#import "VLCSlider.h"
|
||||
#import "VLCSliderCell.h"
|
||||
#import "CompatibilityFixes.h"
|
||||
|
||||
@implementation VLCSlider
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
- (void)setSliderStyleDark
|
||||
{
|
||||
// Color Declarations
|
||||
if (OSX_MOJAVE_AND_HIGHER) {
|
||||
if (@available(macOS 10.14, *)) {
|
||||
_gradientColor = [NSColor colorWithCalibratedRed: 0.20 green: 0.20 blue: 0.20 alpha: 1];
|
||||
_knobFillColor = [NSColor colorWithCalibratedRed: 0.81 green: 0.81 blue: 0.81 alpha: 1];
|
||||
_activeKnobFillColor = [NSColor colorWithCalibratedRed: 0.76 green: 0.76 blue: 0.76 alpha: 1];
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#import "VLCVolumeSlider.h"
|
||||
#import "VLCVolumeSliderCell.h"
|
||||
#import "CompatibilityFixes.h"
|
||||
|
||||
@implementation VLCVolumeSlider
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
- (void)setSliderStyleDark
|
||||
{
|
||||
// Color Declarations
|
||||
if (OSX_MOJAVE_AND_HIGHER) {
|
||||
if (@available(macOS 10.14, *)) {
|
||||
_gradientColor = [NSColor colorWithCalibratedRed: 0.20 green: 0.20 blue: 0.20 alpha: 1];
|
||||
_knobFillColor = [NSColor colorWithCalibratedRed: 0.81 green: 0.81 blue: 0.81 alpha: 1];
|
||||
_activeKnobFillColor = [NSColor colorWithCalibratedRed: 0.76 green: 0.76 blue: 0.76 alpha: 1];
|
||||
|
|
Loading…
Reference in New Issue