summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-25 03:08:22 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-25 03:08:22 (GMT)
commitbb03160acc655d17f53f5ded04b1b8edfa213c59 (patch)
treeb74862e19d742ccf8e04823138f43e36c1613e75
parent84f405aa315dfec7c3d26d40a50185046d30164a (diff)
downloadQt-bb03160acc655d17f53f5ded04b1b8edfa213c59.zip
Qt-bb03160acc655d17f53f5ded04b1b8edfa213c59.tar.gz
Qt-bb03160acc655d17f53f5ded04b1b8edfa213c59.tar.bz2
If zooming on nothing, zoom 2x rather than doing nothing.
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml2
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)
}
}