summaryrefslogtreecommitdiff
path: root/demos/declarative/webbrowser
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-26 12:01:05 +1000
committerMartin Jones <martin.jones@nokia.com>2010-02-26 12:01:05 +1000
commit5fb329228bd1cd1126428b045a41a4a9c1033dc5 (patch)
treef93828abe89818729d717d3e9cdae94929f6fb13 /demos/declarative/webbrowser
parent3218d437a13ac82f65abcea0db099f54504c8875 (diff)
downloadqt4-tools-5fb329228bd1cd1126428b045a41a4a9c1033dc5.tar.gz
Renamed Flickable viewportXXX properties contentXXX
A viewport is the thing you look through, not what you look at.
Diffstat (limited to 'demos/declarative/webbrowser')
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml22
-rw-r--r--demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml8
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml8
3 files changed, 19 insertions, 19 deletions
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml
index b60a95f2a5..e686d0268e 100644
--- a/demos/declarative/webbrowser/content/FlickableWebView.qml
+++ b/demos/declarative/webbrowser/content/FlickableWebView.qml
@@ -10,8 +10,8 @@ Flickable {
id: flickable
width: parent.width
- viewportWidth: Math.max(parent.width,webView.width*webView.scale)
- viewportHeight: Math.max(parent.height,webView.height*webView.scale)
+ contentWidth: Math.max(parent.width,webView.width*webView.scale)
+ contentHeight: Math.max(parent.height,webView.height*webView.scale)
anchors.top: headerSpace.bottom
anchors.bottom: footer.top
anchors.left: parent.left
@@ -53,10 +53,10 @@ Flickable {
if (centerX) {
var sc = zoom/contentsScale;
scaleAnim.to = sc;
- flickVX.from = flickable.viewportX
+ flickVX.from = flickable.contentX
flickVX.to = Math.max(0,Math.min(centerX-flickable.width/2,webView.width*sc-flickable.width))
finalX.value = flickVX.to
- flickVY.from = flickable.viewportY
+ flickVY.from = flickable.contentY
flickVY.to = Math.max(0,Math.min(centerY-flickable.height/2,webView.height*sc-flickable.height))
finalY.value = flickVY.to
finalZoom.value = zoom
@@ -76,8 +76,8 @@ Flickable {
}
onUrlChanged: {
// got to topleft
- flickable.viewportX = 0
- flickable.viewportY = 0
+ flickable.contentX = 0
+ flickable.contentY = 0
if (url != null) { header.editUrl = url.toString(); }
}
onDoubleClick: {
@@ -110,7 +110,7 @@ Flickable {
NumberAnimation {
id: flickVX
target: flickable
- property: "viewportX"
+ property: "contentX"
easing.type: "Linear"
duration: 200
from: 0 // set before calling
@@ -119,7 +119,7 @@ Flickable {
NumberAnimation {
id: flickVY
target: flickable
- property: "viewportY"
+ property: "contentY"
easing.type: "Linear"
duration: 200
from: 0 // set before calling
@@ -136,19 +136,19 @@ Flickable {
property: "scale"
value: 1.0
}
- // Have to set the viewportXY, since the above 2
+ // Have to set the contentXY, since the above 2
// size changes may have started a correction if
// contentsScale < 1.0.
PropertyAction {
id: finalX
target: flickable
- property: "viewportX"
+ property: "contentX"
value: 0 // set before calling
}
PropertyAction {
id: finalY
target: flickable
- property: "viewportY"
+ property: "contentY"
value: 0 // set before calling
}
PropertyAction {
diff --git a/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml b/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml
index f9051500ed..e8c9208b79 100644
--- a/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml
+++ b/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml
@@ -9,10 +9,10 @@ Image {
source: "pics/header.png"
width: parent.width
height: 60
- x: webView.viewportX < 0 ? -webView.viewportX : webView.viewportX > webView.viewportWidth-webView.width
- ? -webView.viewportX+webView.viewportWidth-webView.width : 0
- y: webView.viewportY < 0 ? -webView.viewportY : progressOff*
- (webView.viewportY>height?-height:-webView.viewportY)
+ x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width
+ ? -webView.contentX+webView.contentWidth-webView.width : 0
+ y: webView.contentY < 0 ? -webView.contentY : progressOff*
+ (webView.contentY>height?-height:-webView.contentY)
Text {
id: headerText
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml
index faafd5d497..6a427f42d1 100644
--- a/demos/declarative/webbrowser/webbrowser.qml
+++ b/demos/declarative/webbrowser/webbrowser.qml
@@ -30,10 +30,10 @@ Item {
anchors.bottom: footer.top
}
RectSoftShadow {
- x: -webView.viewportX
- y: -webView.viewportY
- width: webView.viewportWidth
- height: webView.viewportHeight+headerSpace.height
+ x: -webView.contentX
+ y: -webView.contentY
+ width: webView.contentWidth
+ height: webView.contentHeight+headerSpace.height
}
Item {
id: headerSpace