[NOTEPAD] Fix and simplify Status Bar handling (#5076)

- Rename DoCreateStatusBar as DoShowHideStatusBar.
- Simplify WM_SIZE handler.
- Enable/disable CMD_STATUSBAR menu item correctly.
- Make DoShowHideStatusBar independent from DoCreateEditWindow.
This commit is contained in:
Katayama Hirofumi MZ 2023-02-17 09:23:25 +09:00 committed by GitHub
parent d04e148d1c
commit 621439d6f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 141 deletions

View file

@ -157,9 +157,6 @@ void NOTEPAD_LoadSettingsFromRegistry(void)
Globals.main_rect.right = Globals.main_rect.left + dx;
Globals.main_rect.bottom = Globals.main_rect.top + dy;
/* invert value because DIALOG_ViewStatusBar will be called to show it */
Globals.bShowStatusBar = !Globals.bShowStatusBar;
if (dwPointSize != 0)
Globals.lfFont.lfHeight = HeightFromPointSize(dwPointSize);
else
@ -170,7 +167,7 @@ void NOTEPAD_LoadSettingsFromRegistry(void)
else
{
/* If no settings are found in the registry, then use default values */
Globals.bShowStatusBar = FALSE;
Globals.bShowStatusBar = TRUE;
Globals.bWrapLongLines = FALSE;
SetRect(&Globals.lMargins, 750, 1000, 750, 1000);