]> granicus.if.org Git - nethack/commit
B08002 - win32gui: message window sizing (from <Someone>)
authornethack.allison <nethack.allison>
Wed, 21 Aug 2002 23:14:27 +0000 (23:14 +0000)
committernethack.allison <nethack.allison>
Wed, 21 Aug 2002 23:14:27 +0000 (23:14 +0000)
commitb3417655da0e455063f63e8a42358a0cb6a9ee35
treef151d6950f190a2e1aaa7c3e83296e4cbf31f3c8
parent5d492abf6f3d1f2e9241bf1e3b47dd1f1974f320
B08002 - win32gui: message window sizing (from <Someone>)
>>>  - When I set font and font size of the message window, the
>>>  message window size doesn't calculate correctly to show the
>>>  number of message lines specified. For example, I set the font
>>>  size to 6, and the number of messages to display to 8. Now
>>>  there is whitespace at the top of my message window. When I
>>>  set the font size to 14 now, I see only 5.5 message lines.
>>>  This is unintuitive: the interface should recalculate the
>>>  window size needed to display the correct number of lines.
>>>
>>  I agree, especially since the message window size is
>>  recalculated correctly if you save and restore. An easy way out
>>  would be to set those options to DISP_IN_GAME.
>
>  That seems like a good work-around until the proper fix is done.

The patch is attached. I moved the code that was computing the font
size to mswin_message_window_size(). This will cause the message
window to resize properly if the message font size changes. There
are also 2 minor bits in mswproc.c to invalidate the message window
when the font changes.
win/win32/mhmsgwnd.c
win/win32/mswproc.c