mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-27 18:10:31 -05:00
Fix missing function definition on macOS
This commit is contained in:
parent
2eb82c8356
commit
771ecdba12
1 changed files with 12 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue