diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-05-31 18:04:44 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-05-31 18:04:44 (GMT) |
commit | 6bd67cf30b1574a114d9852820fe0fb8d3d10c50 (patch) | |
tree | 5e6f3d40d5a33cc9f88e872d11475d249ccd9f25 /demos/declarative/webbrowser | |
parent | 1fede5dccd56541835046035bb2a8d28d4781e0f (diff) | |
download | Qt-6bd67cf30b1574a114d9852820fe0fb8d3d10c50.zip Qt-6bd67cf30b1574a114d9852820fe0fb8d3d10c50.tar.gz Qt-6bd67cf30b1574a114d9852820fe0fb8d3d10c50.tar.bz2 |
Fix zoom bug in QML Web Browser demo
Zooming out no longer zooms to smaller than the window size.
Diffstat (limited to 'demos/declarative/webbrowser')
-rw-r--r-- | demos/declarative/webbrowser/content/FlickableWebView.qml | 4 | ||||
-rw-r--r-- | demos/declarative/webbrowser/webbrowser.qml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml index 34e8fff..3a1b515 100644 --- a/demos/declarative/webbrowser/content/FlickableWebView.qml +++ b/demos/declarative/webbrowser/content/FlickableWebView.qml @@ -96,8 +96,8 @@ Flickable { function doZoom(zoom,centerX,centerY) { if (centerX) { - var sc = zoom/contentsScale; - scaleAnim.to = zoom; + var sc = zoom*contentsScale; + scaleAnim.to = sc; flickVX.from = flickable.contentX flickVX.to = Math.max(0,Math.min(centerX-flickable.width/2,webView.width*sc-flickable.width)) finalX.value = flickVX.to diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index 36e03bf..a923c92 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -47,7 +47,7 @@ import "content" Rectangle { id: webBrowser - property string urlString : "http://qt.nokia.com/" + property string urlString : "http://www.nokia.com/" width: 800; height: 600 color: "#343434" |