summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-12-02 06:59:13 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-12-02 06:59:13 (GMT)
commit4c8fdfca8b31916f9a130c163914ded7eb391807 (patch)
tree7e735516cbdcbd9181ce9c778c1f563afca74e06 /demos
parent37b4fd7b6615b5e73b0fb71d56df98302ec90de3 (diff)
downloadQt-4c8fdfca8b31916f9a130c163914ded7eb391807.zip
Qt-4c8fdfca8b31916f9a130c163914ded7eb391807.tar.gz
Qt-4c8fdfca8b31916f9a130c163914ded7eb391807.tar.bz2
Fix initial scaling. QWebPage::setPreferredSize doesn't really work.
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml
index 09a3c04..7c46d4c 100644
--- a/demos/declarative/webbrowser/content/FlickableWebView.qml
+++ b/demos/declarative/webbrowser/content/FlickableWebView.qml
@@ -67,12 +67,12 @@ Flickable {
Keys.onLeftPressed: webView.contentsScale -= 0.1
Keys.onRightPressed: webView.contentsScale += 0.1
- preferredWidth: flickable.width
- preferredHeight: flickable.height
+ preferredWidth: flickable.width*zoomFactor
+ preferredHeight: flickable.height*zoomFactor
contentsScale: 1/zoomFactor
onContentsSizeChanged: {
// zoom out
- contentsScale = flickable.width / contentsSize.width
+ contentsScale = Math.min(0.25,flickable.width / contentsSize.width)
}
onUrlChanged: {
// got to topleft