diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-05-10 05:38:12 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-05-11 22:42:19 (GMT) |
commit | 1809eb091cb47c914713ecef6e514e912a4e113b (patch) | |
tree | 2f4bfa7a7d5ecf21cc304677a51e3368a7afad39 /demos | |
parent | 952ab3f97a77c1f15b526df13c96602f6501f8ea (diff) | |
download | Qt-1809eb091cb47c914713ecef6e514e912a4e113b.zip Qt-1809eb091cb47c914713ecef6e514e912a4e113b.tar.gz Qt-1809eb091cb47c914713ecef6e514e912a4e113b.tar.bz2 |
Expand if available space changes.
Task-number: QT-3175
Diffstat (limited to 'demos')
-rw-r--r-- | demos/declarative/webbrowser/content/FlickableWebView.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml index 2862cc4..7efbaa3 100644 --- a/demos/declarative/webbrowser/content/FlickableWebView.qml +++ b/demos/declarative/webbrowser/content/FlickableWebView.qml @@ -20,6 +20,12 @@ Flickable { anchors.right: parent.right pressDelay: 200 + onWidthChanged : { + // Expand (but not above 1:1) if otherwise would be smaller that available width. + if (width > webView.width*webView.contentsScale && webView.contentsScale < 1.0) + webView.contentsScale = width / webView.width * webView.contentsScale; + } + WebView { id: webView pixelCacheSize: 4000000 |