Skip to content

Commit

Permalink
Issue 696: Fix inverted scroll direction on MacOS
Browse files Browse the repository at this point in the history
The scroll direction is inverted on MacOS, remove the ev.inverted() check and constant.

closes equalsraf#696
  • Loading branch information
smathy authored Feb 29, 2024
1 parent 80756b4 commit f35c798
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/gui/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1498,9 +1498,7 @@ void Shell::wheelEvent(QWheelEvent *ev)
QSize cellSize,
int deltasPerStep) noexcept
{
int invertConstant{ (ev.inverted()) ? -1 : 1 };

QPoint scrollRemainderAndEvent { (ev.angleDelta() * invertConstant) + scrollRemainderOut };
QPoint scrollRemainderAndEvent{ ev.angleDelta() + scrollRemainderOut };

scrollRemainderOut.rx() = scrollRemainderAndEvent.x() % deltasPerStep;
scrollRemainderOut.ry() = scrollRemainderAndEvent.y() % deltasPerStep;
Expand Down

0 comments on commit f35c798

Please sign in to comment.