move macOS transparency fix one level up
This commit is contained in:
@@ -914,12 +914,7 @@ bool wxNonOwnedWindowCocoaImpl::SetTransparent(wxByte alpha)
|
|||||||
|
|
||||||
bool wxNonOwnedWindowCocoaImpl::SetBackgroundColour(const wxColour& col )
|
bool wxNonOwnedWindowCocoaImpl::SetBackgroundColour(const wxColour& col )
|
||||||
{
|
{
|
||||||
// only set the native background color if the toplevel window's
|
[m_macWindow setBackgroundColor:col.OSXGetNSColor()];
|
||||||
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -254,6 +254,13 @@ wxPoint wxNonOwnedWindow::GetClientAreaOrigin() const
|
|||||||
|
|
||||||
bool wxNonOwnedWindow::SetBackgroundColour(const wxColour& c )
|
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 )
|
if ( !wxWindow::SetBackgroundColour(c) && m_hasBgCol )
|
||||||
return false ;
|
return false ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user