From f12531e40b97407675318650e35b771e48e37762 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 10 Sep 2019 16:39:19 +0300 Subject: [PATCH] let cells be taller than wide too (take 2) --- xwords4/common/board.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xwords4/common/board.c b/xwords4/common/board.c index 0b6931233..f5cfb3ec8 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -585,6 +585,17 @@ board_figureLayout( BoardCtxt* board, const CurGameInfo* gi, if ( ldims.boardWidth > bWidth ) { ldims.boardWidth = bWidth; } + + if ( 0 == nToScroll && + bHeight > (ldims.scoreHt + ldims.boardHt + ldims.trayHt) ) { + XP_U16 oldTop = ldims.trayTop; + ldims.trayTop = ldims.scoreHt + (ldims.boardHt * colPctMax) / 100; + if ( ldims.trayTop + ldims.trayHt > bHeight ) { + ldims.trayTop = bHeight - ldims.trayHt; + } + XP_ASSERT( oldTop <= ldims.trayTop ); + ldims.height += ldims.trayTop - oldTop; + } #else XP_USE(colPctMax); #endif