From eb627b0677495c2b6d85d15eaf82a74ef6f38795 Mon Sep 17 00:00:00 2001 From: ozone10 Date: Mon, 6 May 2024 16:47:43 +0200 Subject: [PATCH] Enhance GUI: make sizing arrows more coherent in Find dialog Remove vertical sizing arrows from Find & Replace dialog. fix #15099, close #15100 --- .../src/ScintillaComponent/FindReplaceDlg.cpp | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 875048816..452912d10 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -1232,6 +1232,55 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA return TRUE; } + case WM_NCHITTEST: + { + LRESULT lrHitTest = ::DefWindowProc(_hSelf, message, wParam, lParam); + switch (lrHitTest) + { + case HTTOP: + { + lrHitTest = HTBORDER; + break; + } + + case HTTOPLEFT: + { + lrHitTest = HTLEFT; + break; + } + + case HTTOPRIGHT: + { + lrHitTest = HTRIGHT; + break; + } + + case HTBOTTOM: + { + lrHitTest = HTBORDER; + break; + } + + case HTBOTTOMLEFT: + { + lrHitTest = HTLEFT; + break; + } + + case HTBOTTOMRIGHT: + { + lrHitTest = HTRIGHT; + break; + } + + default: + return FALSE; + } + + ::SetWindowLongPtr(_hSelf, DWLP_MSGRESULT, lrHitTest); + return TRUE; + } + case WM_CTLCOLOREDIT: { return NppDarkMode::onCtlColorSofter(reinterpret_cast(wParam));