move macOS transparency fix one level up
This commit is contained in:
@@ -914,11 +914,6 @@ bool wxNonOwnedWindowCocoaImpl::SetTransparent(wxByte alpha)
|
||||
|
||||
bool wxNonOwnedWindowCocoaImpl::SetBackgroundColour(const wxColour& col )
|
||||
{
|
||||
// only set the native background color if the toplevel window's
|
||||
// background is not supposed to be transparent, otherwise the
|
||||
// transparency is lost
|
||||
if( GetWXPeer()->GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT &&
|
||||
!(GetWXPeer()->GetWindowStyle() & wxFRAME_SHAPED) )
|
||||
[m_macWindow setBackgroundColor:col.OSXGetNSColor()];
|
||||
return true;
|
||||
}
|
||||
|
@@ -254,6 +254,13 @@ wxPoint wxNonOwnedWindow::GetClientAreaOrigin() const
|
||||
|
||||
bool wxNonOwnedWindow::SetBackgroundColour(const wxColour& c )
|
||||
{
|
||||
// only set the native background color if the toplevel window's
|
||||
// background is not supposed to be transparent, otherwise the
|
||||
// transparency is lost
|
||||
if( GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT ||
|
||||
(GetWindowStyle() & wxFRAME_SHAPED) )
|
||||
return false;
|
||||
|
||||
if ( !wxWindow::SetBackgroundColour(c) && m_hasBgCol )
|
||||
return false ;
|
||||
|
||||
|
Reference in New Issue
Block a user