Skip to content

Commit

Permalink
Always use angleDelta() for scrolling
Browse files Browse the repository at this point in the history
Using pixelDelta() resulted in seemingly meaningless values on
KWin/Wayland. Qt code uses angleDelta() exclusively, so I see no reason
not to do the same.

Closes #2236.
  • Loading branch information
lmoureaux committed Oct 26, 2024
1 parent 69b78f6 commit b1b59d6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions client/mapview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,7 @@ void map_view::resizeEvent(QResizeEvent *event)
*/
void map_view::wheelEvent(QWheelEvent *event)
{
auto delta = event->pixelDelta();
if (delta.isNull()) {
delta = event->angleDelta();
}
auto delta = event->angleDelta();

if (event->modifiers() == Qt::NoModifier) {
// Scrolling
Expand Down

0 comments on commit b1b59d6

Please sign in to comment.