mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-25 15:56:44 -06:00
41be5479af
Detects dark mode at server start and styles the runtime accordingly. Patch modified by: Neel Patel
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;
|
|
}
|
|
}
|