fix transparency problems on macOS
under mojave any backgroundColor destroys transparency
This commit is contained in:
@@ -914,6 +914,11 @@ 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;
|
||||
}
|
||||
|
@@ -152,7 +152,6 @@ bool wxNonOwnedWindow::Create(wxWindow *parent,
|
||||
wxWindowCreateEvent event(this);
|
||||
HandleWindowEvent(event);
|
||||
|
||||
if ( GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
|
||||
SetBackgroundColour(wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ));
|
||||
|
||||
if ( parent )
|
||||
|
Reference in New Issue
Block a user