diff options
author | Zufu Liu <unknown> | 2024-10-14 08:18:29 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2024-10-14 08:18:29 +1100 |
commit | 0810c2b873a754d78c3d269a279f40e2f7ade035 (patch) | |
tree | ca085a28db7e0dd363bd1a20601066b7578499ab | |
parent | a63766d101df9ce02cef81ada9f8216dd4e008f0 (diff) | |
download | scintilla-mirror-0810c2b873a754d78c3d269a279f40e2f7ade035.tar.gz |
Bug [#2449]. Fix direction of horizontal scrolling with touchpad.
-rw-r--r-- | doc/ScintillaHistory.html | 12 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 6 |
2 files changed, 17 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index a13e93f10..bf75dbedc 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -586,6 +586,18 @@ </table> <h2>Releases</h2> <h3> + <a href="https://www.scintilla.org/scintilla553.zip">Release 5.5.3</a> + </h3> + <ul> + <li> + Released 18 October 2024. + </li> + <li> + On Win32 change direction of horizontal mouse wheel and touchpad scrolling to match other applications. + <a href="https://sourceforge.net/p/scintilla/bugs/2449/">Bug #2449</a>. + </li> + </ul> + <h3> <a href="https://www.scintilla.org/scintilla552.zip">Release 5.5.2</a> </h3> <ul> diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 5fd06cd16..7242f590d 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1645,7 +1645,11 @@ sptr_t ScintillaWin::MouseMessage(unsigned int iMessage, uptr_t wParam, sptr_t l MouseWheelDelta &wheelDelta = (iMessage == WM_MOUSEHWHEEL) ? horizontalWheelDelta : verticalWheelDelta; if (wheelDelta.Accumulate(wParam)) { - const int charsToScroll = charsPerScroll * wheelDelta.Actions(); + int charsToScroll = charsPerScroll * wheelDelta.Actions(); + if (iMessage == WM_MOUSEHWHEEL) { + // horizontal scroll is in reverse direction + charsToScroll = -charsToScroll; + } const int widthToScroll = static_cast<int>(std::lround(charsToScroll * vs.aveCharWidth)); HorizontalScrollToClamped(xOffset + widthToScroll); } |