summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-02 18:26:44 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-03 10:26:08 (GMT)
commit93e9bc06427c6a8e1b6d6f939cf53ae5c95e0827 (patch)
treeb4e677abcb3b69dc602e29fe113041895f1e0e5f /src/gui/widgets
parentcfcfae65778f2e1e7fc3936c66689e3685f1cc77 (diff)
downloadQt-93e9bc06427c6a8e1b6d6f939cf53ae5c95e0827.zip
Qt-93e9bc06427c6a8e1b6d6f939cf53ae5c95e0827.tar.gz
Qt-93e9bc06427c6a8e1b6d6f939cf53ae5c95e0827.tar.bz2
Gesture api review.
Changes to the gesture api after the review. Reviewed-by: Jasmin Blanchette
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qplaintextedit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 0e5ee46..44feaaf 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1458,15 +1458,15 @@ bool QPlainTextEdit::event(QEvent *e)
QScrollBar *vBar = verticalScrollBar();
if (g->state() == Qt::GestureStarted)
d->originalOffsetY = vBar->value();
- QPointF totalOffset = g->totalOffset();
- if (!totalOffset.isNull()) {
+ QPointF offset = g->offset();
+ if (!offset.isNull()) {
if (QApplication::isRightToLeft())
- totalOffset.rx() *= -1;
+ offset.rx() *= -1;
// QPlainTextEdit scrolls by lines only in vertical direction
QFontMetrics fm(document()->defaultFont());
int lineHeight = fm.height();
int newX = hBar->value() - g->lastOffset().x();
- int newY = d->originalOffsetY - totalOffset.y()/lineHeight;
+ int newY = d->originalOffsetY - offset.y()/lineHeight;
hBar->setValue(newX);
vBar->setValue(newY);
}