Skip to content

Commit

Permalink
fixed:press the shift key to support horizontal scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Super committed Sep 9, 2023
1 parent a0178b2 commit 1baa819
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/details/QCefViewPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,12 @@ QCefViewPrivate::onViewWheelEvent(QWheelEvent* event)

e.x = p.x();
e.y = p.y();

// angleDelta().y() provides the angle through which the common vertical mouse wheel was rotated since the previous
// event. angleDelta().x() provides the angle through which the horizontal mouse wheel was rotated, if the mouse has
// a horizontal wheel; otherwise it stays at zero.
pCefBrowser_->GetHost()->SendMouseWheelEvent(
e, m & Qt::ShiftModifier ? d.x() : 0, m & Qt::ShiftModifier ? d.y() : 0);
e, m & Qt::ShiftModifier ? d.x() : 0, m & Qt::ShiftModifier ? d.y() : d.y());
}
}

Expand Down

0 comments on commit 1baa819

Please sign in to comment.