Add compilation guards for macOS 10.10 to avoid warnings

"[NSColor linkColor]" gives a compile-time warning even if we don't use
it during the run-time, so check MAC_OS_X_VERSION_MAX_ALLOWED before
using it.
This commit is contained in:
Vadim Zeitlin
2020-05-06 17:48:28 +02:00
parent 5dab468444
commit e60d43c21e

View File

@@ -163,11 +163,13 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
sysColor = [NSColor windowBackgroundColor];
break;
case wxSYS_COLOUR_HOTLIGHT:
#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];