ensure that scroll position is always in scrolling range, otherwise we could have a window without scrollbars at all but with non zero scroll offset which was really strange
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,9 +35,30 @@ protected:
|
||||
int pixelsPerLine,
|
||||
int winSize,
|
||||
int virtSize,
|
||||
int *pos,
|
||||
int *lines,
|
||||
int *linesPerPage);
|
||||
|
||||
void DoAdjustHScrollbar(int winSize, int virtSize)
|
||||
{
|
||||
DoAdjustScrollbar
|
||||
(
|
||||
m_win->m_scrollBar[wxWindow::ScrollDir_Horz],
|
||||
m_xScrollPixelsPerLine, winSize, virtSize,
|
||||
&m_xScrollPosition, &m_xScrollLines, &m_xScrollLinesPerPage
|
||||
);
|
||||
}
|
||||
|
||||
void DoAdjustVScrollbar(int winSize, int virtSize)
|
||||
{
|
||||
DoAdjustScrollbar
|
||||
(
|
||||
m_win->m_scrollBar[wxWindow::ScrollDir_Vert],
|
||||
m_yScrollPixelsPerLine, winSize, virtSize,
|
||||
&m_yScrollPosition, &m_yScrollLines, &m_yScrollLinesPerPage
|
||||
);
|
||||
}
|
||||
|
||||
// and this does the same for Scroll()
|
||||
void DoScroll(int orient,
|
||||
int pos,
|
||||
|
Reference in New Issue
Block a user