summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtextedit.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-09-30 06:52:50 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-10-01 12:52:40 (GMT)
commit45f095b8970dc3c1b6f6e97fa2323654ba848288 (patch)
tree73e1c8d019ebbc3cb2b6bd4e20f209a9e73e7287 /src/gui/widgets/qtextedit.cpp
parentdf7669b7f41f4284e297c0e8d56b3d71019625d0 (diff)
downloadQt-45f095b8970dc3c1b6f6e97fa2323654ba848288.zip
Qt-45f095b8970dc3c1b6f6e97fa2323654ba848288.tar.gz
Qt-45f095b8970dc3c1b6f6e97fa2323654ba848288.tar.bz2
Fix: Abstract slider does not understand wheel events properly
A wheel event contain delta values that describe the rotation angle the wheel was rotated (in 1/8 of a degree). For some mouse devices (thinking of mac mighty mouse/trackpad) the resolution is better than the standard 15 degrees. The Qt docs describe how to deal with this. But abstract scrollbar does did follow this recipe, but it does now with this patch. Reb-By: prasanth
Diffstat (limited to 'src/gui/widgets/qtextedit.cpp')
-rw-r--r--src/gui/widgets/qtextedit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index dc78fd5..3fe9bb4 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -174,8 +174,13 @@ void QTextEditPrivate::init(const QString &html)
if (!html.isEmpty())
control->setHtml(html);
+#ifdef Q_OS_MAC
+ hbar->setSingleStep(1);
+ vbar->setSingleStep(1);
+#else
hbar->setSingleStep(20);
vbar->setSingleStep(20);
+#endif
viewport->setBackgroundRole(QPalette::Base);
q->setAcceptDrops(true);