From 675a9c0de58fcbe045a22b2d00a0b6c3c4f6da14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 12 Apr 2005 14:36:59 +0000 Subject: [PATCH] use configured scrolling increments (m_scrollLineX/Y) instead of hardcoded constants in all places git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 889365a4f4..81f8324414 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4331,7 +4331,7 @@ void wxGrid::CalcDimensions() y = wxMax( h - 1, 0 ); // do set scrollbar parameters - SetScrollbars( GRID_SCROLL_LINE_X, GRID_SCROLL_LINE_Y, + SetScrollbars( m_scrollLineX, m_scrollLineY, GetScrollX(w), GetScrollY(h), x, y, GetBatchCount() != 0); @@ -8075,7 +8075,7 @@ void wxGrid::MakeCellVisible( int row, int col ) // // Sometimes GRID_SCROLL_LINE/2 is not enough, so just add a full // scroll unit... - ypos += GRID_SCROLL_LINE_Y; + ypos += m_scrollLineY; } if ( left < 0 ) @@ -8090,15 +8090,15 @@ void wxGrid::MakeCellVisible( int row, int col ) xpos = x0 + (right - cw); // see comment for ypos above - xpos += GRID_SCROLL_LINE_X; + xpos += m_scrollLineX; } if ( xpos != -1 || ypos != -1 ) { if ( xpos != -1 ) - xpos /= GRID_SCROLL_LINE_X; + xpos /= m_scrollLineX; if ( ypos != -1 ) - ypos /= GRID_SCROLL_LINE_Y; + ypos /= m_scrollLineY; Scroll( xpos, ypos ); AdjustScrollbars(); } @@ -9844,8 +9844,8 @@ void wxGrid::AutoSize() // won't get the scrollbars if we're sized exactly to this width // CalcDimension adds m_extraWidth + 1 etc. to calculate the necessary // scrollbar steps - wxSize sizeFit(GetScrollX(size.x + m_extraWidth + 1) * GRID_SCROLL_LINE_X, - GetScrollY(size.y + m_extraHeight + 1) * GRID_SCROLL_LINE_Y); + wxSize sizeFit(GetScrollX(size.x + m_extraWidth + 1) * m_scrollLineX, + GetScrollY(size.y + m_extraHeight + 1) * m_scrollLineY); // distribute the extra space between the columns/rows to avoid having // extra white space