aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r--src/quicktemplates2/qquickcontrol.cpp7
-rw-r--r--src/quicktemplates2/qquicktextarea.cpp6
2 files changed, 9 insertions, 4 deletions
diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp
index bbbd0e62..409fb582 100644
--- a/src/quicktemplates2/qquickcontrol.cpp
+++ b/src/quicktemplates2/qquickcontrol.cpp
@@ -179,9 +179,10 @@ bool QQuickControlPrivate::acceptTouch(const QTouchEvent::TouchPoint &point)
// If the control is on a Flickable that has a pressDelay, then the press is never
// sent as a touch event, therefore we need to check for this case.
- if (touchId == -1 && pressWasTouch && point.state() == Qt::TouchPointReleased &&
- point.pos() == previousPressPos) {
- return true;
+ if (touchId == -1 && pressWasTouch && point.state() == Qt::TouchPointReleased) {
+ const auto delta = QVector2D(point.pos() - previousPressPos);
+ if (!QQuickWindowPrivate::dragOverThreshold(delta))
+ return true;
}
return false;
}
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp
index d09d9c3b..64fc631d 100644
--- a/src/quicktemplates2/qquicktextarea.cpp
+++ b/src/quicktemplates2/qquicktextarea.cpp
@@ -1086,7 +1086,11 @@ QSGNode *QQuickTextArea::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *
if (d->flickable)
clipper = d->flickable;
- const QRectF cr = clipper->clipRect().adjusted(leftPadding(), topPadding(), -rightPadding(), -bottomPadding());
+ const QRectF cr = clipper->clipRect().adjusted(
+ leftPadding(), topPadding(),
+ (!d->cursorItem && effectiveHAlign() == HAlignment::AlignRight ? 1 : 0) - rightPadding(),
+ -bottomPadding());
+
clipNode->setRect(!d->flickable ? cr : cr.translated(d->flickable->contentX(), d->flickable->contentY()));
clipNode->update();