fixing custom background on non owned windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -898,19 +898,18 @@ bool wxNonOwnedWindow::SetBackgroundColour(const wxColour& c )
|
|||||||
if ( !wxWindow::SetBackgroundColour(col) && m_hasBgCol )
|
if ( !wxWindow::SetBackgroundColour(col) && m_hasBgCol )
|
||||||
return false ;
|
return false ;
|
||||||
|
|
||||||
if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
|
if ( GetBackgroundStyle() != wxBG_STYLE_CUSTOM )
|
||||||
{
|
{
|
||||||
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDocumentWindowBackground, false ) ;
|
if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
|
||||||
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
|
{
|
||||||
}
|
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDocumentWindowBackground, false ) ;
|
||||||
else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
|
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
||||||
{
|
}
|
||||||
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDialogBackgroundActive, false ) ;
|
else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
|
||||||
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
|
{
|
||||||
}
|
SetThemeWindowBackground( (WindowRef) m_macWindow, kThemeBrushDialogBackgroundActive, false ) ;
|
||||||
else
|
SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
||||||
{
|
}
|
||||||
SetBackgroundStyle(wxBG_STYLE_COLOUR);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user