Skip to content

Commit

Permalink
Set "Find and Replace" dialog to transparent mode when deactivated.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Jul 22, 2018
1 parent c11e421 commit 1e47d19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/Edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -4850,6 +4850,9 @@ INT_PTR CALLBACK EditFindReplaceDlgProcW(HWND hwnd, UINT umsg, WPARAM wParam, LP
}
break;

case WM_ACTIVATE :
SetWindowTransparentMode(hwnd, LOWORD(wParam) == WA_INACTIVE);
break;
}

return FALSE;
Expand Down
7 changes: 3 additions & 4 deletions src/Notepad2.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ int iEscFunction;
BOOL bAlwaysOnTop;
BOOL bMinimizeToTray;
BOOL bTransparentMode;
BOOL bTransparentModeAvailable;
BOOL bShowToolbar;
BOOL bShowStatusbar;

Expand Down Expand Up @@ -2236,8 +2235,9 @@ void MsgInitMenu(HWND hwnd, WPARAM wParam, LPARAM lParam) {
CheckCmd(hmenu, IDM_VIEW_STICKYWINPOS, bStickyWinPos);
CheckCmd(hmenu, IDM_VIEW_ALWAYSONTOP, ((bAlwaysOnTop || flagAlwaysOnTop == 2) && flagAlwaysOnTop != 1));
CheckCmd(hmenu, IDM_VIEW_MINTOTRAY, bMinimizeToTray);
CheckCmd(hmenu, IDM_VIEW_TRANSPARENT, bTransparentMode && bTransparentModeAvailable);
EnableCmd(hmenu, IDM_VIEW_TRANSPARENT, bTransparentModeAvailable);
i = IsWin2KAndAbove(); // bTransparentModeAvailable
CheckCmd(hmenu, IDM_VIEW_TRANSPARENT, bTransparentMode && i);
EnableCmd(hmenu, IDM_VIEW_TRANSPARENT, i);

CheckCmd(hmenu, IDM_VIEW_NOSAVERECENT, bSaveRecentFiles);
CheckCmd(hmenu, IDM_VIEW_NOSAVEFINDREPL, bSaveFindReplace);
Expand Down Expand Up @@ -5316,7 +5316,6 @@ void LoadSettings(void) {
bAlwaysOnTop = IniSectionGetBool(pIniSection, L"AlwaysOnTop", 0);
bMinimizeToTray = IniSectionGetBool(pIniSection, L"MinimizeToTray", 0);
bTransparentMode = IniSectionGetBool(pIniSection, L"TransparentMode", 0);
bTransparentModeAvailable = IsWin2KAndAbove();

IniSectionGetString(pIniSection, L"ToolbarButtons", L"", tchToolbarButtons, COUNTOF(tchToolbarButtons));

Expand Down

0 comments on commit 1e47d19

Please sign in to comment.