diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-25 03:08:22 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-25 03:08:22 (GMT) |
commit | bb03160acc655d17f53f5ded04b1b8edfa213c59 (patch) | |
tree | b74862e19d742ccf8e04823138f43e36c1613e75 /demos/declarative/webbrowser | |
parent | 84f405aa315dfec7c3d26d40a50185046d30164a (diff) | |
download | Qt-bb03160acc655d17f53f5ded04b1b8edfa213c59.zip Qt-bb03160acc655d17f53f5ded04b1b8edfa213c59.tar.gz Qt-bb03160acc655d17f53f5ded04b1b8edfa213c59.tar.bz2 |
If zooming on nothing, zoom 2x rather than doing nothing.
Diffstat (limited to 'demos/declarative/webbrowser')
-rw-r--r-- | demos/declarative/webbrowser/webbrowser.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index bfc0749..105bb07 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -222,6 +222,8 @@ Item { onDoubleClick: { if (!heuristicZoom(clickX,clickY,2.5)) { var zf = flickable.width > 980 ? 1 : flickable.width/980; + if (zf > zoomFactor) + zf = 2.0 // zoom in (else zooming out) doZoom(zf,clickX/zoomFactor*zf,clickY/zoomFactor*zf) } } |