for vertical scoreboards, force miniwindow to be entirely inside the board.

This commit is contained in:
ehouse 2006-05-14 15:27:29 +00:00
parent e98ef5b962
commit bb7e827703

View file

@ -682,6 +682,7 @@ positionMiniWRect( BoardCtxt* board, XP_Rect* rect, XP_Bool center )
} else { } else {
rect->left = x - rect->width > 0? x - rect->width : x; rect->left = x - rect->width > 0? x - rect->width : x;
} }
rect->left = XP_MAX( board->boardBounds.left + 1, rect->left );
rect->top = XP_MAX( board->boardBounds.top + 1, y - rect->height ); rect->top = XP_MAX( board->boardBounds.top + 1, y - rect->height );
} }
} /* positionBonusRect */ } /* positionBonusRect */
@ -1291,7 +1292,8 @@ board_setTrayLoc( BoardCtxt* board, XP_U16 trayLeft, XP_U16 trayTop,
+ (board->boardVScale * model_numRows( board->model )); + (board->boardVScale * model_numRows( board->model ));
boardRight = board->boardBounds.left boardRight = board->boardBounds.left
+ (board->boardHScale * model_numCols( board->model )); + (board->boardHScale * model_numCols( board->model ));
board->boardObscuresTray = (trayTop < boardBottom) && (trayLeft < boardRight); board->boardObscuresTray = (trayTop < boardBottom)
&& (trayLeft < boardRight);
boardHidesTray = board->boardObscuresTray; boardHidesTray = board->boardObscuresTray;
if ( boardHidesTray ) { /* can't hide if doesn't obscure */ if ( boardHidesTray ) { /* can't hide if doesn't obscure */