diff options
author | Zeno Albisser <zeno.albisser@nokia.com> | 2010-08-17 08:16:40 -0400 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@nokia.com> | 2010-08-17 08:16:40 -0400 |
commit | d0a04932d8aaf723094bed5e5abbfc47f9528789 (patch) | |
tree | a9c46dc77c08e63fec7bee6989989d9e3a6bdb44 | |
parent | b81d66d25025277862f5872610c20b133758ccb8 (diff) |
solved anchor bug
-rwxr-xr-x | multilayer-dashboard/MainWidget.qml | 11 | ||||
-rw-r--r-- | multilayer-dashboard/RowFour.qml | 9 | ||||
-rw-r--r-- | multilayer-dashboard/RowThree.qml | 5 | ||||
-rw-r--r-- | multilayer-dashboard/RowTwo.qml | 9 |
4 files changed, 24 insertions, 10 deletions
diff --git a/multilayer-dashboard/MainWidget.qml b/multilayer-dashboard/MainWidget.qml index 4062d52..1c528e0 100755 --- a/multilayer-dashboard/MainWidget.qml +++ b/multilayer-dashboard/MainWidget.qml @@ -48,9 +48,13 @@ Rectangle { id: dashboard Rectangle { + anchors.fill: parent id: rowWidgetContainer RowOne { id: firstRow + anchors.left: parent.left + anchors.top: parent.top + anchors.bottom: parent.bottom reparentWidget: dashboard topLevel: dashboard } @@ -58,6 +62,8 @@ Rectangle { RowTwo { id: secondRow anchors.left : firstRow.right + anchors.top: parent.top + anchors.bottom: parent.bottom reparentWidget: dashboard topLevel: dashboard } @@ -65,13 +71,18 @@ Rectangle { RowThree { id: thirdRow anchors.left : secondRow.right + anchors.top: parent.top + anchors.bottom: parent.bottom reparentWidget: dashboard topLevel: dashboard + } RowFour { id: fourthRow anchors.left : thirdRow.right + anchors.top: parent.top + anchors.bottom: parent.bottom reparentWidget: dashboard topLevel: dashboard } diff --git a/multilayer-dashboard/RowFour.qml b/multilayer-dashboard/RowFour.qml index 49b03a8..a2c78b7 100644 --- a/multilayer-dashboard/RowFour.qml +++ b/multilayer-dashboard/RowFour.qml @@ -57,16 +57,9 @@ Rectangle { color: "green" reparentWidget: myRow.reparentWidget } - StrokeList { - x:10 - anchors.top : firstWidget.bottom - anchors.topMargin: 2.0 - id: strokeList -// reparentWidget: myRow.reparentWidget - } TapWidget { x:10 - anchors.top : strokeList.bottom + anchors.top : firstWidget.bottom anchors.topMargin : 2.0 id: secondWidget color: "blue" diff --git a/multilayer-dashboard/RowThree.qml b/multilayer-dashboard/RowThree.qml index 98b7d0f..9b7f2ca 100644 --- a/multilayer-dashboard/RowThree.qml +++ b/multilayer-dashboard/RowThree.qml @@ -43,8 +43,8 @@ import Qt.labs.gestures 1.0 Rectangle { width: 200 - height: 340 id: myRow + property variant reparentWidget: myRow property variant topLevel: myRow @@ -86,7 +86,8 @@ Rectangle { anchors.fill: parent Pan { - when: Math.abs(gesture.delta.y) > Math.abs(gesture.delta.x) + when: console.log("we are panning") +// when: Math.abs(gesture.delta.y) > Math.abs(gesture.delta.x) onUpdated: { tapWidgetContainer.pos.y = tapWidgetContainer.pos.y + gesture.delta.y; diff --git a/multilayer-dashboard/RowTwo.qml b/multilayer-dashboard/RowTwo.qml index 98b7d0f..db0539a 100644 --- a/multilayer-dashboard/RowTwo.qml +++ b/multilayer-dashboard/RowTwo.qml @@ -71,6 +71,15 @@ Rectangle { anchors.topMargin : 2.0 id: thirdWidget reparentWidget: myRow.reparentWidget + GestureArea { + id: tapOpenStrokeList + anchors.fill: parent + Tap { + onFinished: { + console.log("hello world") + } + } + } } property int maxY : (tapWidgetContainer.childrenRect.height > topLevel.height) ? |