mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-16 11:38:50 -04: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];
|
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 -------------------------
|
// ------------------------- C++ Trampolines -------------------------
|
||||||
//
|
//
|
||||||
|
@ -129,10 +140,7 @@ bool AppKit::isHidden(pid_t pid)
|
||||||
|
|
||||||
bool AppKit::isDarkMode()
|
bool AppKit::isDarkMode()
|
||||||
{
|
{
|
||||||
NSDictionary *dict = [[NSUserDefaults standardUserDefaults] persistentDomainForName:NSGlobalDomain];
|
return [static_cast<id>(self) isDarkMode];
|
||||||
id style = [dict objectForKey:@"AppleInterfaceStyle"];
|
|
||||||
return ( style && [style isKindOfClass:[NSString class]]
|
|
||||||
&& NSOrderedSame == [style caseInsensitiveCompare:@"dark"] );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue