Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
7673a4d117 (qt/qtdeclarative/dev) 7673a4d117 (qt/tqtc-qtdeclarative/dev)
Description
When multiple handlers can drive behavior in multiple ways (e.g. maybe a PinchHandler and a WheelHandler can both be used to change the scale), and a BoundaryRule is used to enforce limits, if minimum/maximumOvershoot properties are set, the BoundaryRule will animate the target property back into range after the handlers are done manipulating it.
If we apply this combination to rescaling an image (as in QtPDF, or as in qtdeclarative/examples/quick/pointerhandlers/map.qml), we need to know when to do the re-rendering. If the handlers stay within the range that BoundaryRule allows, the image can be re-rendered when the active handler is deactivated; but if the BoundaryRule limits the scale property and allows overshoot, the image re-rendering should perhaps wait until the returnDuration has expired, so that we are sure the scale property is constrained to the maximum or minimum. Otherwise, it becomes possible to "bump" the image rendering size repeatedly beyond the intended limit, by overshooting, because at the moment that the handler is deactivated, the image.scale is beyond the limit that the BoundaryRule is trying to enforce; so that's not a good value to use for re-rendering.
There may be other such cases, not only for image scaling. Anything that needs to be done conditionally whenever the property is no longer being adjusted and the BoundaryRule is satisfied... so maybe a notifying property to find out whether it's satisfied would be good. Either we can call it something like that (satisfied, inRange, enforced, ...) or well maybe currentOvershoot is good enough... needs investigation.
Attachments
Issue Links
- relates to
-
QTBUG-104769 pdfviewer example: Pinch zoom on laptop trackpad stops working if zoom way in
- Closed
For Gerrit Dashboard: QTBUG-105107 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
429866,7 | Add BoundaryRule.returnedToBounds signal | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |