Use GetBackgroundColour so it will revert to the default if

wxNullColour is used


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-06-17 22:50:54 +00:00
parent ee8bf34fba
commit b52acd035e

View File

@@ -918,17 +918,18 @@ bool wxWindowMac::SetBackgroundColour(const wxColour& col )
return false ; return false ;
wxBrush brush ; wxBrush brush ;
if ( col == wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE) ) wxColour newCol(GetBackgroundColour());
if ( newCol == wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE) )
{ {
brush.MacSetTheme( kThemeBrushDocumentWindowBackground ) ; brush.MacSetTheme( kThemeBrushDocumentWindowBackground ) ;
} }
else if ( col == wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE ) ) else if ( newCol == wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE ) )
{ {
brush.MacSetTheme( kThemeBrushDialogBackgroundActive ) ; brush.MacSetTheme( kThemeBrushDialogBackgroundActive ) ;
} }
else else
{ {
brush.SetColour( col ) ; brush.SetColour( newCol ) ;
} }
MacSetBackgroundBrush( brush ) ; MacSetBackgroundBrush( brush ) ;