From: Robert Roebling Date: Tue, 20 May 2008 12:44:21 +0000 (+0000) Subject: Don't make lines narrower that default line height in variable height mode, don't... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/981cd83efc80aaaadd4521b044f95602cef9c65c?ds=sidebyside Don't make lines narrower that default line height in variable height mode, don't miss button press git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 533d34a9bc..f9f0346f8b 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2953,7 +2953,7 @@ int wxDataViewMainWindow::GetLineStart( unsigned int row ) const unsigned int cols = GetOwner()->GetColumnCount(); unsigned int col; - int height = 0; + int height = m_lineHeight; for (col = 0; col < cols; col++) { const wxDataViewColumn *column = GetOwner()->GetColumn(col); @@ -3005,7 +3005,7 @@ int wxDataViewMainWindow::GetLineAt( unsigned int y ) const unsigned int cols = GetOwner()->GetColumnCount(); unsigned int col; - int height = 0; + int height = m_lineHeight; for (col = 0; col < cols; col++) { const wxDataViewColumn *column = GetOwner()->GetColumn(col); @@ -3052,7 +3052,7 @@ int wxDataViewMainWindow::GetLineHeight( unsigned int row ) const wxDataViewItem item = node->GetItem(); - int height = 0; + int height = m_lineHeight; unsigned int cols = GetOwner()->GetColumnCount(); unsigned int col; @@ -3722,7 +3722,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) wxRect rect( xpos + indent + EXPANDER_MARGIN, GetLineStart( current ) + EXPANDER_MARGIN + (GetLineHeight(current)/2) - (m_lineHeight/2) - EXPANDER_OFFSET, m_lineHeight-2*EXPANDER_MARGIN, - m_lineHeight-2*EXPANDER_MARGIN); + m_lineHeight-2*EXPANDER_MARGIN + EXPANDER_OFFSET); if( rect.Contains( x, y) ) { //So the mouse is over the expander @@ -3850,7 +3850,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) wxRect rect( xpos + indent + EXPANDER_MARGIN, GetLineStart( current ) + EXPANDER_MARGIN + (GetLineHeight(current)/2) - (m_lineHeight/2) - EXPANDER_OFFSET, m_lineHeight-2*EXPANDER_MARGIN, - m_lineHeight-2*EXPANDER_MARGIN); + m_lineHeight-2*EXPANDER_MARGIN + EXPANDER_OFFSET); if( rect.Contains( x, y) ) {