Don't hard code white background colour in generic wxDataViewCtrl.

wxDataViewMainWindow::OnPaint() always used the white brush to erase the
control background which was wrong, change it to use the background colour of
the control.

Also add tests for setting wxDataViewCtrl foreground and background colours to
the dataview sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-09-26 16:43:19 +00:00
parent 2fa90e33ea
commit bb58fa37cd
2 changed files with 35 additions and 5 deletions

View File

@@ -1656,11 +1656,9 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
wxAutoBufferedPaintDC dc( this );
#ifdef __WXMSW__
dc.SetBrush(GetOwner()->GetBackgroundColour());
dc.SetPen( *wxTRANSPARENT_PEN );
dc.SetBrush( wxBrush( GetBackgroundColour()) );
dc.SetBrush( *wxWHITE_BRUSH );
wxSize size( GetClientSize() );
dc.DrawRectangle( 0,0,size.x,size.y );
dc.DrawRectangle(GetClientSize());
#endif
// prepare the DC