🍎 Add 'dark-mode-changed' event to app api
This commit is contained in:
parent
eaac67ac60
commit
c4049cb393
7 changed files with 31 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue