m_hScrollBarAlwaysShown = false;
m_vScrollBarAlwaysShown = false;
- m_macBackgroundBrush = wxNullBrush ;
-
m_macIsUserPane = true;
m_clipChildren = false ;
m_cachedClippedRectValid = false ;
if ( !wxWindowBase::SetBackgroundColour(col) && m_hasBgCol )
return false ;
- wxBrush brush ;
- wxColour newCol(GetBackgroundColour());
-
- if ( newCol == wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) )
- brush.MacSetTheme( kThemeBrushDocumentWindowBackground ) ;
- else if ( newCol == wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) )
- brush.MacSetTheme( kThemeBrushDialogBackgroundActive ) ;
- else
- brush.SetColour( newCol ) ;
-
- MacSetBackgroundBrush( brush ) ;
- MacUpdateControlFont() ;
+ m_peer->SetBackgroundColour( col ) ;
return true ;
}
-void wxWindowMac::MacSetBackgroundBrush( const wxBrush &brush )
-{
- m_macBackgroundBrush = brush ;
- m_peer->SetBackground( brush ) ;
-}
-
bool wxWindowMac::MacCanFocus() const
{
// TODO : evaluate performance hits by looking up this value, eventually cache the results for a 1 sec or so
return ;
#if TARGET_API_MAC_OSX
- if ( !m_macBackgroundBrush.Ok() || m_macBackgroundBrush.GetStyle() == wxTRANSPARENT
- || GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT )
+ if ( !m_backgroundColour.Ok() || GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT )
{
event.Skip() ;
}
CGPoint cgpoint = CGPointMake( rect.right - size , rect.bottom - size ) ;
CGContextSaveGState( cgContext );
- if ( m_macBackgroundBrush.Ok() && m_macBackgroundBrush.GetStyle() != wxTRANSPARENT )
+ if ( m_backgroundColour.Ok() )
{
- wxMacCoreGraphicsColour bkgnd( m_macBackgroundBrush ) ;
- bkgnd.Apply( cgContext );
+ CGContextSetFillColorWithColor( cgContext, m_backgroundColour.GetCGColor() );
}
else
{