matrix compile fix
make listctrl scroll one line in report more, not some arbitrary 15 pixels git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fdd4c4d0a4
commit
08bf1d5d98
@ -27,7 +27,7 @@
|
||||
#include "wx/defs.h"
|
||||
#endif
|
||||
|
||||
#include "wxmatrix.h"
|
||||
#include "wx/matrix.h"
|
||||
#include <math.h>
|
||||
|
||||
const double pi = 3.1415926535;
|
||||
|
@ -2056,8 +2056,8 @@ void wxListMainWindow::MoveToFocus()
|
||||
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
if (item_y-5 < view_y )
|
||||
Scroll( -1, (item_y-5)/m_yScroll );
|
||||
if (item_y < view_y )
|
||||
Scroll( -1, (item_y)/m_yScroll );
|
||||
if (item_y+item_h+5 > view_y+client_h)
|
||||
Scroll( -1, (item_y+item_h-client_h+15)/m_yScroll );
|
||||
}
|
||||
@ -2761,6 +2761,9 @@ void wxListMainWindow::CalculatePositions()
|
||||
|
||||
if (m_mode & wxLC_REPORT)
|
||||
{
|
||||
// scroll one line per step
|
||||
m_yScroll = lineSpacing;
|
||||
|
||||
int x = 4;
|
||||
int y = 1;
|
||||
int entireHeight = m_lines.GetCount() * lineSpacing + 2;
|
||||
@ -2768,7 +2771,7 @@ void wxListMainWindow::CalculatePositions()
|
||||
#if wxUSE_GENERIC_LIST_EXTENSIONS
|
||||
int x_scroll_pos = GetScrollPos( wxHORIZONTAL );
|
||||
#else
|
||||
SetScrollbars( m_xScroll, m_yScroll, 0, (entireHeight+15) / m_yScroll, 0, scroll_pos, TRUE );
|
||||
SetScrollbars( m_xScroll, m_yScroll, 0, entireHeight/m_yScroll +1, 0, scroll_pos, TRUE );
|
||||
#endif
|
||||
GetClientSize( &clientWidth, &clientHeight );
|
||||
|
||||
@ -2792,7 +2795,7 @@ void wxListMainWindow::CalculatePositions()
|
||||
}
|
||||
m_visibleLines = clientHeight / lineSpacing;
|
||||
#if wxUSE_GENERIC_LIST_EXTENSIONS
|
||||
SetScrollbars( m_xScroll, m_yScroll, entireWidth / m_xScroll , (entireHeight+15) / m_yScroll, x_scroll_pos , scroll_pos, TRUE );
|
||||
SetScrollbars( m_xScroll, m_yScroll, entireWidth/m_xScroll +1, entireHeight/m_yScroll +1, x_scroll_pos , scroll_pos, TRUE );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -622,6 +622,7 @@ COMMONOBJS = \
|
||||
list.o \
|
||||
log.o \
|
||||
longlong.o \
|
||||
matrix.o \
|
||||
memory.o \
|
||||
menucmn.o \
|
||||
mimecmn.o \
|
||||
|
@ -622,6 +622,7 @@ COMMONOBJS = \
|
||||
list.o \
|
||||
log.o \
|
||||
longlong.o \
|
||||
matrix.o \
|
||||
memory.o \
|
||||
menucmn.o \
|
||||
mimecmn.o \
|
||||
|
Loading…
Reference in New Issue
Block a user