mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: only check darkMode effectiveAppearance in 10.15 (#19082)
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user