* src/frontends/qt4/QWorkArea.C

(QWorkArea::mouseMoveEvent): Use qt wide scroll wheel setting


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13409 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-03-16 20:34:20 +00:00
parent d69e34402a
commit c9c37cab4e

View File

@ -389,10 +389,15 @@ void QWorkArea::mouseMoveEvent(QMouseEvent * e)
void QWorkArea::wheelEvent(QWheelEvent * e)
{
verticalScrollBar()->setValue(verticalScrollBar()->value() - e->delta());
adjustViewWithScrollBar();
// Wheel rotation by one notch results in a delta() of 120 (see
// documentation of QWheelEvent)
int const lines = QApplication::wheelScrollLines() * e->delta() / 120;
verticalScrollBar()->setValue(verticalScrollBar()->value() -
lines * verticalScrollBar()->lineStep());
adjustViewWithScrollBar();
}
void QWorkArea::generateSyntheticMouseEvent()
{
// Set things off to generate the _next_ 'pseudo' event.