From 71bb680a93a05947b6c82842fdcf5e79c842f944 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 11 Jun 2018 22:38:05 +0200 Subject: [PATCH] Using NSColor System Colours Removing the old HITheme Constants for the last two wx system colours, first step for Dark Mode support, see https://trac.wxwidgets.org/ticket/18146 --- src/osx/cocoa/settings.mm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/osx/cocoa/settings.mm b/src/osx/cocoa/settings.mm index 101ded7eac..d59f9f7c0e 100644 --- a/src/osx/cocoa/settings.mm +++ b/src/osx/cocoa/settings.mm @@ -74,9 +74,14 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) sysColor = [NSColor windowFrameColor]; break; case wxSYS_COLOUR_WINDOW: - return wxColour(wxMacCreateCGColorFromHITheme( 15 /* kThemeBrushDocumentWindowBackground */ )) ; + sysColor = [NSColor windowBackgroundColor]; + break; case wxSYS_COLOUR_BTNFACE: - return wxColour(wxMacCreateCGColorFromHITheme( 3 /* kThemeBrushDialogBackgroundActive */)); + if ( wxPlatformInfo::Get().CheckOSVersion(10, 14 ) ) + sysColor = [NSColor windowBackgroundColor]; + else + sysColor = [NSColor controlColor]; + break; case wxSYS_COLOUR_LISTBOX: sysColor = [NSColor controlBackgroundColor]; break;