mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
Merge pull request #5081 from DustinLuck/master
Fix horizontal mouse wheel scroll direction
This commit is contained in:
commit
5bac2c544e
@ -1650,7 +1650,8 @@ 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();
|
||||
const int scrollDirectionAdjustment = (iMessage == WM_MOUSEHWHEEL) ? -1 : 1;
|
||||
const int charsToScroll = charsPerScroll * wheelDelta.Actions() * scrollDirectionAdjustment;
|
||||
const int widthToScroll = static_cast<int>(std::lround(charsToScroll * vs.aveCharWidth));
|
||||
HorizontalScrollToClamped(xOffset + widthToScroll);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user