Fix compile-time check for macOS 11
This fixes warnings about MAC_OS_X_VERSION_11_0 not being defined when
using older SDKs, as 21da0e128d (Change wxRendererNative to use
NSCell-based methods under Mac, 2023-11-12) used a wrong name for the
version constant: since macOS 11 these constants don't use "X" in their
names any longer.
Remove this and add a comment to the place where we define them to
document this not quite obvious naming convention.
This commit is contained in:
parent
ce94e1d8b6
commit
d4b5c21de7
2 changed files with 4 additions and 1 deletions
|
|
@ -455,6 +455,9 @@
|
|||
# ifndef MAC_OS_X_VERSION_10_16
|
||||
# define MAC_OS_X_VERSION_10_16 101600
|
||||
# endif
|
||||
/*
|
||||
Note that since macOS 11 there is no more "X" in the names.
|
||||
*/
|
||||
# ifndef MAC_OS_VERSION_11_0
|
||||
# define MAC_OS_VERSION_11_0 110000
|
||||
# endif
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ void wxRendererMac::ApplyMacControlFlags(wxWindow* win, NSCell* cell, int flags)
|
|||
size = NSSmallControlSize;
|
||||
else if (win->GetWindowVariant() == wxWINDOW_VARIANT_MINI || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_MINI))
|
||||
size = NSMiniControlSize;
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_11_0
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
||||
else if (win->GetWindowVariant() == wxWINDOW_VARIANT_LARGE|| (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_LARGE))
|
||||
{
|
||||
if (WX_IS_MACOS_AVAILABLE(11, 0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue