Correct selection/drop highlight rectangles width in generic wxDataViewCtrl.

The third parameter of wxRect ctor is the width, not the right edge.

See #11558.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-12-19 11:17:42 +00:00
parent 68d7680d0f
commit e3dbeaaf31

View File

@ -1656,7 +1656,8 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
if (m_hasFocus)
flags |= wxCONTROL_FOCUSED;
wxRect rect( x_start, GetLineStart( item ), x_last, GetLineHeight( item ) );
wxRect rect( x_start, GetLineStart( item ),
x_last - x_start, GetLineHeight( item ) );
wxRendererNative::Get().DrawItemSelectionRect
(
this,
@ -1671,7 +1672,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
if (m_dropHint)
{
wxRect rect( x_start, GetLineStart( m_dropHintLine ),
x_last, GetLineHeight( m_dropHintLine ) );
x_last - x_start, GetLineHeight( m_dropHintLine ) );
dc.SetPen( *wxBLACK_PEN );
dc.SetBrush( *wxTRANSPARENT_BRUSH );
dc.DrawRectangle( rect );