diff options
author | Zufu Liu <unknown> | 2024-04-18 09:32:10 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2024-04-18 09:32:10 +1000 |
commit | 5c10bcc7ef9ca881b7d6d851992702bae53ff968 (patch) | |
tree | e0f0824e73f51c7c6bf912c5f8ce73bf66b5672a /win32/PlatWin.cxx | |
parent | c802a109fd6d4f40434a600216d6ae622f0633c6 (diff) | |
download | scintilla-mirror-5c10bcc7ef9ca881b7d6d851992702bae53ff968.tar.gz |
Bug [#2321]. Scale reverse arrow cursor for margins to match other cursors.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 91194c4c5..c3c6b609a 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2782,7 +2782,7 @@ void Window::InvalidateRectangle(PRectangle rc) { ::InvalidateRect(HwndFromWindowID(wid), &rcw, FALSE); } -HCURSOR LoadReverseArrowCursor(UINT dpi) noexcept { +HCURSOR LoadReverseArrowCursor(UINT dpi, int cursorBaseSize) noexcept { class CursorHelper { public: ICONINFO info{}; @@ -2848,8 +2848,15 @@ HCURSOR LoadReverseArrowCursor(UINT dpi) noexcept { HCURSOR reverseArrowCursor {}; - const int width = SystemMetricsForDpi(SM_CXCURSOR, dpi); - const int height = SystemMetricsForDpi(SM_CYCURSOR, dpi); + int width; + int height; + if (cursorBaseSize > defaultCursorBaseSize) { + width = ::MulDiv(cursorBaseSize, dpi, USER_DEFAULT_SCREEN_DPI); + height = width; + } else { + width = SystemMetricsForDpi(SM_CXCURSOR, dpi); + height = SystemMetricsForDpi(SM_CYCURSOR, dpi); + } DPI_AWARENESS_CONTEXT oldContext = nullptr; if (fnAreDpiAwarenessContextsEqual && fnAreDpiAwarenessContextsEqual(fnGetThreadDpiAwarenessContext(), DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)) { |