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
This commit is contained in:
parent
8d4433b6fc
commit
675a9c0de5
@ -4331,7 +4331,7 @@ void wxGrid::CalcDimensions()
|
|||||||
y = wxMax( h - 1, 0 );
|
y = wxMax( h - 1, 0 );
|
||||||
|
|
||||||
// do set scrollbar parameters
|
// do set scrollbar parameters
|
||||||
SetScrollbars( GRID_SCROLL_LINE_X, GRID_SCROLL_LINE_Y,
|
SetScrollbars( m_scrollLineX, m_scrollLineY,
|
||||||
GetScrollX(w), GetScrollY(h), x, y,
|
GetScrollX(w), GetScrollY(h), x, y,
|
||||||
GetBatchCount() != 0);
|
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
|
// Sometimes GRID_SCROLL_LINE/2 is not enough, so just add a full
|
||||||
// scroll unit...
|
// scroll unit...
|
||||||
ypos += GRID_SCROLL_LINE_Y;
|
ypos += m_scrollLineY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( left < 0 )
|
if ( left < 0 )
|
||||||
@ -8090,15 +8090,15 @@ void wxGrid::MakeCellVisible( int row, int col )
|
|||||||
xpos = x0 + (right - cw);
|
xpos = x0 + (right - cw);
|
||||||
|
|
||||||
// see comment for ypos above
|
// see comment for ypos above
|
||||||
xpos += GRID_SCROLL_LINE_X;
|
xpos += m_scrollLineX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( xpos != -1 || ypos != -1 )
|
if ( xpos != -1 || ypos != -1 )
|
||||||
{
|
{
|
||||||
if ( xpos != -1 )
|
if ( xpos != -1 )
|
||||||
xpos /= GRID_SCROLL_LINE_X;
|
xpos /= m_scrollLineX;
|
||||||
if ( ypos != -1 )
|
if ( ypos != -1 )
|
||||||
ypos /= GRID_SCROLL_LINE_Y;
|
ypos /= m_scrollLineY;
|
||||||
Scroll( xpos, ypos );
|
Scroll( xpos, ypos );
|
||||||
AdjustScrollbars();
|
AdjustScrollbars();
|
||||||
}
|
}
|
||||||
@ -9844,8 +9844,8 @@ void wxGrid::AutoSize()
|
|||||||
// won't get the scrollbars if we're sized exactly to this width
|
// won't get the scrollbars if we're sized exactly to this width
|
||||||
// CalcDimension adds m_extraWidth + 1 etc. to calculate the necessary
|
// CalcDimension adds m_extraWidth + 1 etc. to calculate the necessary
|
||||||
// scrollbar steps
|
// scrollbar steps
|
||||||
wxSize sizeFit(GetScrollX(size.x + m_extraWidth + 1) * GRID_SCROLL_LINE_X,
|
wxSize sizeFit(GetScrollX(size.x + m_extraWidth + 1) * m_scrollLineX,
|
||||||
GetScrollY(size.y + m_extraHeight + 1) * GRID_SCROLL_LINE_Y);
|
GetScrollY(size.y + m_extraHeight + 1) * m_scrollLineY);
|
||||||
|
|
||||||
// distribute the extra space between the columns/rows to avoid having
|
// distribute the extra space between the columns/rows to avoid having
|
||||||
// extra white space
|
// extra white space
|
||||||
|
Loading…
Reference in New Issue
Block a user