macOS 26 amd overriding drawRect

3 views
Skip to first unread message

Robert Roebling

unread,
9:16 AM (6 hours ago) 9:16 AM
to wx-...@googlegroups.com
Hi all,

as it has already been pointed out, overriding drawRect in windows.mm
causes legacy rendering on macOS 26 Tahoe. In my case, every control
gets rendered old style. By completely never overriding drawRect, I
get a perfectly looking system - but no wxPaintEvent. Below is the
comment
in notebook.mm and I think we need to do this for every native
control. I could do a search and
replace to do this, but maybe Stefan has a good idea where to do this
smartly. Also, there is the
question if we should keep allowing to use onPaint in native controls
using a flag - I don't think so, but maybe others have a different
opinion.

Robert

// On macOS 26 Tahoe, the mere presence of drawRect: in derived class,
// even if it just calls super's implementation, triggers legacy
// rendering of NSTabView.
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_26_0
if (WX_IS_MACOS_AVAILABLE(26, 0))
{
wxOSXCocoaClassAddWXMethods(self, wxOSXSKIP_DRAW);
}
else
#endif
{
wxOSXCocoaClassAddWXMethods(self);
}
}
Reply all
Reply to author
Forward
0 new messages