Skip to content

Commit

Permalink
fix: only check darkMode effectiveAppearance in 10.15 (#19082)
Browse files Browse the repository at this point in the history
  • Loading branch information
trop[bot] authored and codebytere committed Jul 2, 2019
1 parent 32ad5be commit bff8573
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atom/browser/api/atom_api_system_preferences_mac.mm
Expand Up @@ -557,7 +557,7 @@ AVMediaType ParseMediaType(const std::string& media_type) {
}

bool SystemPreferences::IsDarkMode() {
if (@available(macOS 10.14, *)) {
if (@available(macOS 10.15, *)) {
return [[NSApplication sharedApplication].effectiveAppearance.name
isEqualToString:NSAppearanceNameDarkAqua];
}
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/ui/tray_icon_cocoa.mm
Expand Up @@ -149,7 +149,7 @@ - (void)drawRect:(NSRect)dirtyRect {
}

- (BOOL)isDarkMode {
if (@available(macOS 10.14, *)) {
if (@available(macOS 10.15, *)) {
return [[NSApplication sharedApplication].effectiveAppearance.name
isEqualToString:NSAppearanceNameDarkAqua];
}
Expand Down

0 comments on commit bff8573

Please sign in to comment.