summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-05-31 18:04:44 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-05-31 18:04:44 (GMT)
commit6bd67cf30b1574a114d9852820fe0fb8d3d10c50 (patch)
tree5e6f3d40d5a33cc9f88e872d11475d249ccd9f25 /demos
parent1fede5dccd56541835046035bb2a8d28d4781e0f (diff)
downloadQt-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')
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml4
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml2
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"