fix: only check darkMode effectiveAppearance in 10.15 (#19082)

This commit is contained in:
trop[bot]
2019-07-02 14:15:33 -07:00
committed by Shelley Vohr
parent 32ad5be74e
commit bff8573646
2 changed files with 2 additions and 2 deletions

View File

@@ -557,7 +557,7 @@ void SystemPreferences::RemoveUserDefault(const std::string& name) {
}
bool SystemPreferences::IsDarkMode() {
if (@available(macOS 10.14, *)) {
if (@available(macOS 10.15, *)) {
return [[NSApplication sharedApplication].effectiveAppearance.name
isEqualToString:NSAppearanceNameDarkAqua];
}

View File

@@ -149,7 +149,7 @@ const CGFloat kVerticalTitleMargin = 2;
}
- (BOOL)isDarkMode {
if (@available(macOS 10.14, *)) {
if (@available(macOS 10.15, *)) {
return [[NSApplication sharedApplication].effectiveAppearance.name
isEqualToString:NSAppearanceNameDarkAqua];
}