From 27fa32469f7f13b019b55ded2bf97636442624dc Mon Sep 17 00:00:00 2001 From: Michael Bedward Date: Wed, 9 Feb 2000 08:18:52 +0000 Subject: [PATCH] Changed grid line positioning slightly to line up the cells with the labels. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index b954dcdf74..bcf0c8d7b5 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2668,13 +2668,13 @@ void wxGrid::DrawCellBorder( wxDC& dc, const wxGridCellCoords& coords ) // right hand border // - dc.DrawLine( m_colRights[col], m_rowBottoms[row] - m_rowHeights[row], - m_colRights[col], m_rowBottoms[row] ); + dc.DrawLine( m_colRights[col]-1, m_rowBottoms[row] - m_rowHeights[row], + m_colRights[col]-1, m_rowBottoms[row]-1 ); // bottom border // - dc.DrawLine( m_colRights[col] - m_colWidths[col], m_rowBottoms[row], - m_colRights[col], m_rowBottoms[row] ); + dc.DrawLine( m_colRights[col] - m_colWidths[col], m_rowBottoms[row]-1, + m_colRights[col]-1, m_rowBottoms[row]-1 ); } @@ -2786,13 +2786,13 @@ void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & reg ) int i; for ( i = 0; i < m_numRows; i++ ) { - if ( m_rowBottoms[i] > bottom ) + if ( m_rowBottoms[i]-1 > bottom ) { break; } - else if ( m_rowBottoms[i] >= top ) + else if ( m_rowBottoms[i]-1 >= top ) { - dc.DrawLine( left, m_rowBottoms[i], right, m_rowBottoms[i] ); + dc.DrawLine( left, m_rowBottoms[i]-1, right, m_rowBottoms[i]-1 ); } } @@ -2801,13 +2801,13 @@ void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & reg ) // for ( i = 0; i < m_numCols; i++ ) { - if ( m_colRights[i] > right ) + if ( m_colRights[i]-1 > right ) { break; } - else if ( m_colRights[i] >= left ) + else if ( m_colRights[i]-1 >= left ) { - dc.DrawLine( m_colRights[i], top, m_colRights[i], bottom ); + dc.DrawLine( m_colRights[i]-1, top, m_colRights[i]-1, bottom ); } } } -- 2.45.2