mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
23 lines
696 B
Plaintext
23 lines
696 B
Plaintext
|
//////////////////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
// pgAdmin 4 - PostgreSQL Tools
|
||
|
//
|
||
|
// Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
||
|
// This software is released under the PostgreSQL Licence
|
||
|
//
|
||
|
// macos.mm - macOS-specific Objective-C/C++ functions
|
||
|
//
|
||
|
//////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
#import <Cocoa/Cocoa.h>
|
||
|
|
||
|
// Detect if we're running in Dark mode
|
||
|
bool IsDarkMode() {
|
||
|
if (@available(macOS 10.14, *)) {
|
||
|
NSString *interfaceStyle = [NSUserDefaults.standardUserDefaults valueForKey:@"AppleInterfaceStyle"];
|
||
|
return [interfaceStyle isEqualToString:@"Dark"];
|
||
|
} else {
|
||
|
return NO;
|
||
|
}
|
||
|
}
|