aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlcachegen/qtquickcompiler.prf
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-04-28 09:34:24 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-05-07 09:02:41 +0000
commitcb78b25d039bfa82281c458cb329c6e5f3d4f836 (patch)
treefa6e4f1d02d5ff7357ac7aaf6266e735df0c13cf /tools/qmlcachegen/qtquickcompiler.prf
parent38983ad7a28c96bb4add15bafcf8728f0cc5354f (diff)
Use QQDeliveryAgent::sceneTransform, if set, in QQuickItem::mapFromGlobal
During dragging of a QEventPoint, Flickable computes the drag delta as pos - mapFromGlobal(point.globalPressPosition()) We cannot use only the global position delta, because the Flickable might be transformed in 2D (by setting rotation on it or in a parent, as in tst_qquickflickable::clickAndDragWhenTransformed) or in 3D (by mapping it onto a Model object). So we really need QQuickItem::mapFromGlobal() to actually work regardless how many of these transformations are in place. This is just the beginning: we have a lot of these mapFrom/To functions; but it's enough for the Flickable in the quick3d/dynamictexture example to work better. Without this fix, if you tried to drag a yellow note on the door panel, at the very first drag ListView saw a large delta and considered its drag threshold exceeded immediately, whereas the DragHandler on the note saw a very small delta; so ListView grabbed and DragHandler did not steal it: it relies on having "first dibs". When the drag threshold is exceeded, Flickable merely plans to grab on the next event rather than grabbing immediately, and therefore a child has a chance to grab first. Therefore it's normally OK for DragHandler to simply become the first exclusive grabber when the drag threshold is exceeded, and not steal the grab from another item (although grabPermissions can be changed to allow stealing if necessary). However this means that we continue to enforce the drag threshold in local (transformed) coordinates: if Flickable should wait until the user drags 10 pixels, but it's scaled to half-size, it will start dragging after only 5 pixels of movement, for example. Task-number: QTBUG-92944 Change-Id: Id01cc833ca80850ca18a965adf47f435e43e20ed Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit f83efd3feb564cf8b929b9dfde6787853a561069) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tools/qmlcachegen/qtquickcompiler.prf')
0 files changed, 0 insertions, 0 deletions