Merge branch 'pr_fix_macos_hotlight_color' of https://github.com/obfuscated/wxWidgets

Implement wxSYS_COLOUR_HOTLIGHT on macOS.

See https://github.com/wxWidgets/wxWidgets/pull/1841
This commit is contained in:
Vadim Zeitlin 2020-05-28 01:24:56 +02:00
commit 52eec83245

View File

@ -163,8 +163,17 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
sysColor = [NSColor windowBackgroundColor];
break;
case wxSYS_COLOUR_HOTLIGHT:
// OSX doesn't change color on mouse hover
sysColor = [NSColor controlTextColor];
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
{
sysColor = [NSColor linkColor];
}
else
#endif
{
// OSX doesn't change color on mouse hover
sysColor = [NSColor controlTextColor];
}
break;
case wxSYS_COLOUR_MENUHILIGHT:
sysColor = [NSColor selectedMenuItemColor];