Fine-tune file viewer size

The height was supposed to be just tall enough to fit a Super
Hi-Res graphic without needing to scroll, but it had become too
short by about 6 pixels.

The width was supposed to be wide enough to exactly fit 80-column
text, but the optional scroll bar ate two columns when it appeared.
We now over-size the viewer so it looks right when the scroll bar
appears.
This commit is contained in:
Andy McFadden 2015-01-15 16:17:52 -08:00
parent 06eeabc8a4
commit 61c4069031
1 changed files with 3 additions and 2 deletions

View File

@ -245,8 +245,9 @@ Preferences::Preferences(void)
SetPrefString(kPrViewTextTypeFace, L"Courier New");
SetPrefLong(kPrViewTextPointSize, 10);
long width = 680; /* exact width for 80-column text */
long height = 510; /* exact height for file viewer to show IIgs graphic */
long width = 680 + /* exact width for 80-column text */
::GetSystemMetrics(SM_CXVSCROLL);
long height = 516; /* exact height for file viewer to show IIgs graphic */
if (GetSystemMetrics(SM_CXSCREEN) < width)
width = GetSystemMetrics(SM_CXSCREEN);
if (GetSystemMetrics(SM_CYSCREEN) < height)