diff --git a/PowerEditor/src/ScintillaComponent/GoToLineDlg.cpp b/PowerEditor/src/ScintillaComponent/GoToLineDlg.cpp index 381e1dcac..404b63f9c 100644 --- a/PowerEditor/src/ScintillaComponent/GoToLineDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/GoToLineDlg.cpp @@ -24,10 +24,59 @@ INT_PTR CALLBACK GoToLineDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { case WM_INITDIALOG : { + NppDarkMode::autoSubclassAndThemeChildControls(_hSelf); + ::SendDlgItemMessage(_hSelf, IDC_RADIO_GOTOLINE, BM_SETCHECK, TRUE, 0); goToCenter(); return TRUE; } + + case WM_CTLCOLOREDIT: + { + if (NppDarkMode::isEnabled()) + { + return NppDarkMode::onCtlColorSofter(reinterpret_cast(wParam)); + } + break; + } + + case WM_CTLCOLORDLG: + case WM_CTLCOLORSTATIC: + { + if (NppDarkMode::isEnabled()) + { + return NppDarkMode::onCtlColorDarker(reinterpret_cast(wParam)); + } + break; + } + + case WM_PRINTCLIENT: + { + if (NppDarkMode::isEnabled()) + { + return TRUE; + } + break; + } + + case WM_ERASEBKGND: + { + if (NppDarkMode::isEnabled()) + { + RECT rc = { 0 }; + getClientRect(rc); + ::FillRect(reinterpret_cast(wParam), &rc, NppDarkMode::getDarkerBackgroundBrush()); + return TRUE; + } + break; + } + + case NPPM_INTERNAL_REFRESHDARKMODE: + { + NppDarkMode::autoThemeChildControls(_hSelf); + return TRUE; + } + case WM_COMMAND : { switch (wParam) @@ -117,6 +166,7 @@ INT_PTR CALLBACK GoToLineDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) default : return FALSE; } + return FALSE; } void GoToLineDlg::updateLinesNumbers() const @@ -138,4 +188,3 @@ void GoToLineDlg::updateLinesNumbers() const ::SetDlgItemInt(_hSelf, ID_CURRLINE, current, FALSE); ::SetDlgItemInt(_hSelf, ID_LASTLINE, limit, FALSE); } -