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:
Georg Baum 2006-03-16 15:26:44 +00:00
parent fad5cd6700
commit 4c772b2376

View File

@ -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());
}