[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XBoard-devel] ToDo 346: Choose Better Default Windows Sizes
From: |
Mark Ioli |
Subject: |
[XBoard-devel] ToDo 346: Choose Better Default Windows Sizes |
Date: |
Mon, 12 Jul 2004 22:06:18 -0700 |
User-agent: |
Mozilla Thunderbird 0.7.2 (Windows/20040707) |
Commited this change to select a smaller default board size than the largest the
screen will allow (4 sizes smaller), and also places the ICS Interaction window
beside it filling up the rest of the screen. This mainly addresses the initial
startup of WinBoard when there is no WinBoard.ini file. If there are already
settings for board placement but not for the interaction window, it will simply
make the interaction window the same dimensions as the board, in line with it
from the right side of the screen.
Working on a similar change for xboard, only for default board size though since
it uses the console window it is started in as the ICS interaction window.
Mark
Index: winboard.c
===================================================================
RCS file: /cvsroot/xboard/xboard/winboard/winboard.c,v
retrieving revision 2.11
diff -u -r2.11 winboard.c
--- winboard.c 28 Jun 2004 18:23:14 -0000 2.11
+++ winboard.c 13 Jul 2004 04:37:11 -0000
@@ -587,7 +587,7 @@
InitDrawingSizes((BoardSize)ibs, 0);
if (boardSize == (BoardSize)-1 &&
winHeight <= screenHeight && winWidth <= screenWidth) {
- boardSize = (BoardSize)ibs;
+ boardSize = (BoardSize)ibs - 4 < 0 ? (BoardSize)0 : (BoardSize)ibs - 4;
}
}
InitDrawingSizes(boardSize, 0);
@@ -5625,6 +5625,23 @@
wp.rcNormalPosition.bottom = consoleY + consoleH;
SetWindowPlacement(hDlg, &wp);
}
+ else { /* Determine Defaults */
+ WINDOWPLACEMENT wp;
+ consoleX = winWidth + 1;
+ consoleY = boardY;
+ consoleW = screenWidth - winWidth;
+ consoleH = winHeight;
+ EnsureOnScreen(&consoleX, &consoleY);
+ wp.length = sizeof(WINDOWPLACEMENT);
+ wp.flags = 0;
+ wp.showCmd = SW_SHOW;
+ wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
+ wp.rcNormalPosition.left = consoleX;
+ wp.rcNormalPosition.right = consoleX + consoleW;
+ wp.rcNormalPosition.top = consoleY;
+ wp.rcNormalPosition.bottom = consoleY + consoleH;
+ SetWindowPlacement(hDlg, &wp);
+ }
return FALSE;
case WM_SETFOCUS:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [XBoard-devel] ToDo 346: Choose Better Default Windows Sizes,
Mark Ioli <=