backport of r60955
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_9_0_BRANCH@60957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -99,12 +99,18 @@ bool wxNonOwnedWindowCarbonImpl::SetBackgroundColour(const wxColour& col )
|
|||||||
if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
|
if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
|
||||||
{
|
{
|
||||||
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDocumentWindowBackground, false ) ;
|
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDocumentWindowBackground, false ) ;
|
||||||
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
m_wxPeer->SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
||||||
|
// call directly if object is not yet completely constructed
|
||||||
|
if ( m_wxPeer->GetNonOwnedPeer() == NULL )
|
||||||
|
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
||||||
}
|
}
|
||||||
else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
|
else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
|
||||||
{
|
{
|
||||||
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDialogBackgroundActive, false ) ;
|
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDialogBackgroundActive, false ) ;
|
||||||
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
m_wxPeer->SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
||||||
|
// call directly if object is not yet completely constructed
|
||||||
|
if ( m_wxPeer->GetNonOwnedPeer() == NULL )
|
||||||
|
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -346,7 +346,7 @@ bool wxNonOwnedWindow::SetBackgroundStyle(wxBackgroundStyle style)
|
|||||||
if ( !wxWindow::SetBackgroundStyle(style) )
|
if ( !wxWindow::SetBackgroundStyle(style) )
|
||||||
return false ;
|
return false ;
|
||||||
|
|
||||||
return m_nowpeer->SetBackgroundStyle(style);
|
return m_nowpeer ? m_nowpeer->SetBackgroundStyle(style) : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxNonOwnedWindow::DoMoveWindow(int x, int y, int width, int height)
|
void wxNonOwnedWindow::DoMoveWindow(int x, int y, int width, int height)
|
||||||
|
Reference in New Issue
Block a user