mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 23:39:45 -05:00
Fix missing function definition on macOS
This commit is contained in:
parent
2eb82c8356
commit
771ecdba12
@ -93,6 +93,17 @@ AppKit::~AppKit()
|
||||
return [app isHidden];
|
||||
}
|
||||
|
||||
//
|
||||
// Get state of macOS Dark Mode color scheme
|
||||
//
|
||||
- (bool) isDarkMode
|
||||
{
|
||||
NSDictionary *dict = [[NSUserDefaults standardUserDefaults] persistentDomainForName:NSGlobalDomain];
|
||||
id style = [dict objectForKey:@"AppleInterfaceStyle"];
|
||||
return ( style && [style isKindOfClass:[NSString class]]
|
||||
&& NSOrderedSame == [style caseInsensitiveCompare:@"dark"] );
|
||||
}
|
||||
|
||||
//
|
||||
// ------------------------- C++ Trampolines -------------------------
|
||||
//
|
||||
@ -129,10 +140,7 @@ bool AppKit::isHidden(pid_t pid)
|
||||
|
||||
bool AppKit::isDarkMode()
|
||||
{
|
||||
NSDictionary *dict = [[NSUserDefaults standardUserDefaults] persistentDomainForName:NSGlobalDomain];
|
||||
id style = [dict objectForKey:@"AppleInterfaceStyle"];
|
||||
return ( style && [style isKindOfClass:[NSString class]]
|
||||
&& NSOrderedSame == [style caseInsensitiveCompare:@"dark"] );
|
||||
return [static_cast<id>(self) isDarkMode];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user