update nHiddenRows so scrolling finally works

This commit is contained in:
ehouse 2006-05-20 06:22:33 +00:00
parent 27b740c03b
commit d6ddeb0f87

View file

@ -565,7 +565,7 @@ figureBoardParms( CEAppGlobals* globals, XP_U16 nRows, CEBoardParms* bparms )
} }
trayWidth = boardWidth + scrollWidth; trayWidth = boardWidth + scrollWidth;
trayTop = boardHt + scoreHeight; trayTop = boardHt + scoreHeight + 1;
trayVScale = scrnHeight - trayTop; trayVScale = scrnHeight - trayTop;
if ( !horiz ) { if ( !horiz ) {
@ -2520,14 +2520,16 @@ ce_util_trayHiddenChange( XW_UtilCtxt* uc, XW_TrayVisState newState,
XP_U16 nVisibleRows ) XP_U16 nVisibleRows )
{ {
CEAppGlobals* globals = (CEAppGlobals*)uc->closure; CEAppGlobals* globals = (CEAppGlobals*)uc->closure;
XP_U16 nHiddenRows;
#ifdef CEFEATURE_CANSCROLL #ifdef CEFEATURE_CANSCROLL
/* If there's a scrollbar, hide/show it. It wants to be /* If there's a scrollbar, hide/show it. It wants to be
active/visible only when the tray is NOT hidden */ active/visible only when the tray is NOT hidden */
if ( !!globals->scrollHandle ) { if ( !!globals->scrollHandle ) {
updateScrollInfo( globals->scrollHandle, nHiddenRows = model_numRows( globals->game.model ) - nVisibleRows;
model_numRows( globals->game.model ) - nVisibleRows ); updateScrollInfo( globals->scrollHandle, nHiddenRows );
globals->nHiddenRows = nHiddenRows;
} }
#endif #endif