summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-10-07 12:46:43 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-10-08 11:36:15 (GMT)
commit52aaffaf17c4d1bf11a469fe3cc692c3bea6cfe2 (patch)
tree76434af5e55d8488d107c9f8b10df41e64deb278 /src/gui/widgets
parent8050a8ea1b30b0d35fc20e9d09ff48c242a924cd (diff)
downloadQt-52aaffaf17c4d1bf11a469fe3cc692c3bea6cfe2.zip
Qt-52aaffaf17c4d1bf11a469fe3cc692c3bea6cfe2.tar.gz
Qt-52aaffaf17c4d1bf11a469fe3cc692c3bea6cfe2.tar.bz2
Carbon: better wheel acceleration patch
It turns out that scrolling appears to be slow when using non-mac mice with the carbon build. This patch introduces a an acceleration algorithm that closer resembles the one used by Cocoa. Rev-By: prasanth
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qabstractslider.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index 19a8b63..588a48e 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -715,8 +715,7 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e)
#else
stepsToScroll = int(d->offset_accumulated) * QApplication::wheelScrollLines() * d->singleStep;
#endif
- if (qAbs(stepsToScroll) > d->pageStep)
- stepsToScroll = currentOffset > 0 ? d->pageStep : -d->pageStep;
+ stepsToScroll = qBound(-d->pageStep, stepsToScroll, d->pageStep);
}
if (d->invertedControls)