mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 08:50:08 -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];
|
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…
Reference in New Issue
Block a user