mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
QContentPane::mouseMoveEvent: Use qt wide scroll wheel setting
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13401 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fad5cd6700
commit
4c772b2376
@ -258,7 +258,11 @@ void QContentPane::mouseMoveEvent(QMouseEvent * e)
|
||||
|
||||
void QContentPane::wheelEvent(QWheelEvent * e)
|
||||
{
|
||||
wa_->scrollbar_->setValue(wa_->scrollbar_->value() - e->delta());
|
||||
// Wheel rotation by one notch results in a delta() of 120 (see
|
||||
// documentation of QWheelEvent)
|
||||
int const lines = QApplication::wheelScrollLines() * e->delta() / 120;
|
||||
wa_->scrollbar_->setValue(wa_->scrollbar_->value() -
|
||||
lines * wa_->scrollbar_->lineStep());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user