Fix wxSplitterWindow painting on macOS 11
Fix regression in wxSplitterWindow rendering introduced in
287ee5e4c7
- the splitter wouldn't
correctly render its background under some (but not all) circumstances
on macOS 11.
Closes https://github.com/wxWidgets/wxWidgets/pull/2306
Fixes #19106
This commit is contained in:
committed by
Vadim Zeitlin
parent
7063813b59
commit
a2e4cb6cec
@@ -97,13 +97,24 @@ bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0;
|
m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0;
|
||||||
|
|
||||||
// FIXME: with this line the background is not erased at all under GTK1,
|
#ifdef __WXOSX__
|
||||||
// so temporary avoid it there
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_16
|
||||||
#if !defined(__WXGTK__) || defined(__WXGTK20__)
|
if ( WX_IS_MACOS_AVAILABLE(10, 16) )
|
||||||
// don't erase the splitter background, it's pointless as we overwrite it
|
{
|
||||||
// anyhow
|
// Nothing to do: see OnPaint()
|
||||||
SetBackgroundStyle(wxBG_STYLE_PAINT);
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
// FIXME: with this line the background is not erased at all under GTK1,
|
||||||
|
// so temporary avoid it there
|
||||||
|
#if !defined(__WXGTK__) || defined(__WXGTK20__)
|
||||||
|
// don't erase the splitter background, it's pointless as we overwrite it
|
||||||
|
// anyhow
|
||||||
|
SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user