-bool wxTopLevelWindowMac::SetBackgroundColour(const wxColour& col )
+bool wxTopLevelWindowMac::SetBackgroundColour(const wxColour& c )
{
+ wxColour col = c;
+ if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) )
+ col = wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground));
+ else if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) )
+ col = wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive));
+
if ( !wxTopLevelWindowBase::SetBackgroundColour(col) && m_hasBgCol )
return false ;
- if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) || col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
+ if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
- else if ( col == wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) || col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
+ SetBackgroundStyle(wxBG_STYLE_CUSTOM);
+ }
+ else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )