Port from delta(); to angleDelta().y();

This commit is contained in:
Laurent Montel 2019-09-09 18:51:53 +02:00
parent fb18347e4d
commit d60831d650
2 changed files with 2 additions and 2 deletions

View File

@ -1238,7 +1238,7 @@ bool Dialog::event(QEvent *event)
if (!d->mainItemContainsPosition(we->pos())) {
QWheelEvent we2(d->positionAdjustedForMainItem(we->pos()),
d->positionAdjustedForMainItem(we->pos()) + position(),
we->pixelDelta(), we->angleDelta(), we->delta(),
we->pixelDelta(), we->angleDelta(), we->angleDelta().y(),
we->orientation(), we->buttons(), we->modifiers(), we->phase());
if (isVisible()) {

View File

@ -1082,7 +1082,7 @@ void ContainmentInterface::wheelEvent(QWheelEvent *event)
return;
}
m_wheelDelta += event->delta();
m_wheelDelta += event->angleDelta().y();
// Angle delta 120 for common "one click"
// See: https://doc.qt.io/qt-5/qml-qtquick-wheelevent.html#angleDelta-prop