🍎 Add 'dark-mode-changed' event to app api

This commit is contained in:
Daniel Pham 2016-03-01 15:05:44 -05:00
parent eaac67ac60
commit c4049cb393
7 changed files with 31 additions and 1 deletions

View file

@ -24,6 +24,9 @@
// Don't add the "Enter Full Screen" menu item automatically.
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
// Add observer to monitor the system's Dark Mode theme.
[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(darkModeChanged:) name:@"AppleInterfaceThemeChangedNotification" object:nil];
atom::Browser::Get()->WillFinishLaunching();
}
@ -59,4 +62,8 @@
return flag;
}
- (void)darkModeChanged:(NSNotification *)notify {
atom::Browser::Get()->DarkModeChanged();
}
@end