From 945cd7a8c01737a506fcb7c304dfdc71d6fab144 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 5 Apr 2016 18:52:32 +0200 Subject: [PATCH] Pick -boardSize on window width rather than square size For boards with other than 8 files the squares will be scaled different from what the sizeDefaults say, so that the font and menu clipping determined by the latter will match the total board width. We now pick the boardSize after sizing such that popup with an 8-wide board next time would reproduce the board width. --- gtk/xboard.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gtk/xboard.c b/gtk/xboard.c index 5029495..eb7457d 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -1690,7 +1690,7 @@ ReSize (WindowPlacement *wp) lg = sqx < 37 ? 1 : sqx < 59 ? 2 : sqx < 116 ? 3 : 4; if(sqx == oldSqx + 1 && lg == lineGap + 1) sqx = oldSqx, squareSize = 0; // prevent oscillations, force resize by kludge } - for(h=0; sizeDefaults[h].name && sizeDefaults[h].squareSize > sqx; h++) {} + for(h=0; sizeDefaults[h].name && sizeDefaults[h].squareSize*8 > sqx*BOARD_WIDTH; h++) {} if(!strchr(appData.boardSize, ',')) { ASSIGN(appData.boardSize, sizeDefaults[h].name); initialSquareSize = sizeDefaults[h].squareSize; // used for saving font -- 1.7.0.4