Supporting newer transparent background API
This commit is contained in:
@@ -91,6 +91,7 @@ public:
|
|||||||
virtual bool SetForegroundColour( const wxColour &colour ) wxOVERRIDE;
|
virtual bool SetForegroundColour( const wxColour &colour ) wxOVERRIDE;
|
||||||
|
|
||||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style) wxOVERRIDE;
|
virtual bool SetBackgroundStyle(wxBackgroundStyle style) wxOVERRIDE;
|
||||||
|
virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const wxOVERRIDE;
|
||||||
|
|
||||||
virtual int GetCharHeight() const wxOVERRIDE;
|
virtual int GetCharHeight() const wxOVERRIDE;
|
||||||
virtual int GetCharWidth() const wxOVERRIDE;
|
virtual int GetCharWidth() const wxOVERRIDE;
|
||||||
|
@@ -778,6 +778,13 @@ long style, long extraStyle, const wxString& WXUNUSED(name) )
|
|||||||
|
|
||||||
if ( !(style & wxFRAME_TOOL_WINDOW) )
|
if ( !(style & wxFRAME_TOOL_WINDOW) )
|
||||||
[m_macWindow setHidesOnDeactivate:NO];
|
[m_macWindow setHidesOnDeactivate:NO];
|
||||||
|
|
||||||
|
if ( GetWXPeer()->GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT )
|
||||||
|
{
|
||||||
|
[m_macWindow setOpaque:NO];
|
||||||
|
[m_macWindow setAlphaValue:1.0];
|
||||||
|
[m_macWindow setBackgroundColor:[NSColor clearColor]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxNonOwnedWindowCocoaImpl::Create( wxWindow* WXUNUSED(parent), WXWindow nativeWindow )
|
void wxNonOwnedWindowCocoaImpl::Create( wxWindow* WXUNUSED(parent), WXWindow nativeWindow )
|
||||||
|
@@ -152,6 +152,7 @@ bool wxNonOwnedWindow::Create(wxWindow *parent,
|
|||||||
wxWindowCreateEvent event(this);
|
wxWindowCreateEvent event(this);
|
||||||
HandleWindowEvent(event);
|
HandleWindowEvent(event);
|
||||||
|
|
||||||
|
if ( GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
|
||||||
SetBackgroundColour(wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ));
|
SetBackgroundColour(wxSystemSettings::GetColour( wxSYS_COLOUR_APPWORKSPACE ));
|
||||||
|
|
||||||
if ( parent )
|
if ( parent )
|
||||||
|
@@ -518,6 +518,11 @@ bool wxWindowMac::SetBackgroundStyle(wxBackgroundStyle style)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxWindowMac::IsTransparentBackgroundSupported(wxString* WXUNUSED(reason)) const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool wxWindowMac::SetBackgroundColour(const wxColour& col )
|
bool wxWindowMac::SetBackgroundColour(const wxColour& col )
|
||||||
{
|
{
|
||||||
if (m_growBox)
|
if (m_growBox)
|
||||||
|
Reference in New Issue
Block a user