move macOS transparency fix one level up
This commit is contained in:
parent
a94325a76a
commit
708a408733
2 changed files with 8 additions and 6 deletions
|
|
@ -914,12 +914,7 @@ 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()];
|
||||
[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 ;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue