summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-08-18 15:26:59 +0200
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-08-18 15:30:51 +0200
commit25385785a72f925ca0daf8f383ec1b8f77ca443a (patch)
treeaf361f22faf2264d0febc33109d504ecb1aa6a89
parent45dc0670514fb13c4144fef796ad5a424bfd9b22 (diff)
Polished the qml dashboard a bit by removing Rectangles and using Column instead.
-rw-r--r--multilayer-dashboard/RowFour.qml11
-rw-r--r--multilayer-dashboard/RowOne.qml26
-rw-r--r--multilayer-dashboard/RowThree.qml24
-rw-r--r--multilayer-dashboard/RowTwo.qml9
4 files changed, 31 insertions, 39 deletions
diff --git a/multilayer-dashboard/RowFour.qml b/multilayer-dashboard/RowFour.qml
index 1c70984..13c2d07 100644
--- a/multilayer-dashboard/RowFour.qml
+++ b/multilayer-dashboard/RowFour.qml
@@ -42,14 +42,18 @@ import Qt 4.7
import Qt.labs.gestures 1.0
Rectangle {
- width: 200
- height: 340
id: myRow
+
+ width: 160
+ height: 340
+
property variant reparentWidget: myRow
property variant topLevel: myRow
Column {
id: tapWidgetContainer
+ width: parent.width
+ height: parent.height
spacing: 2
ExpandableWidget {
@@ -199,6 +203,5 @@ Rectangle {
}
}
}
- } // end GestureArea
-
+ }
}
diff --git a/multilayer-dashboard/RowOne.qml b/multilayer-dashboard/RowOne.qml
index 9858972..8d049f4 100644
--- a/multilayer-dashboard/RowOne.qml
+++ b/multilayer-dashboard/RowOne.qml
@@ -42,57 +42,49 @@ import Qt 4.7
import Qt.labs.gestures 1.0
Rectangle {
+ id: myRow
+
width: 340
height: 340
- id: myRow
+
property variant reparentWidget: myRow
property variant topLevel: myRow
- Rectangle {
+ Column {
id: tapWidgetContainer
+ width: parent.width
+ height: parent.height
+ spacing: 2
TapAndHoldWidget {
id: firstWidget
color: "green"
}
TapAndHoldWidget {
- anchors.top : firstWidget.bottom
- anchors.topMargin : 2.0
id: secondWidget
color: "blue"
}
TapAndHoldWidget {
- anchors.top : secondWidget.bottom
- anchors.topMargin : 2.0
id: thirdWidget
color: "green"
}
TapAndHoldWidget {
- anchors.top : thirdWidget.bottom
- anchors.topMargin : 2.0
id: fourthWidget
color: "blue"
}
TapAndHoldWidget {
- anchors.top : fourthWidget.bottom
id: fifthWidget
color: "green"
}
TapAndHoldWidget {
- anchors.top : fifthWidget.bottom
- anchors.topMargin : 2.0
id: sixthWidget
color: "blue"
}
TapAndHoldWidget {
- anchors.top : sixthWidget.bottom
- anchors.topMargin : 2.0
id: seventhWidget
color: "green"
}
TapAndHoldWidget {
- anchors.top : seventhWidget.bottom
- anchors.topMargin : 2.0
id: eightWidget
color: "blue"
}
@@ -104,7 +96,7 @@ Rectangle {
property int minY : (tapWidgetContainer.childrenRect.height > topLevel.height) ?
-(tapWidgetContainer.childrenRect.height - topLevel.height) :
0
- } // end Rectangle
+ }
GestureArea {
id: rowGestureArea
@@ -123,6 +115,6 @@ Rectangle {
}
}
}
- } // end GestureArea
+ }
}
diff --git a/multilayer-dashboard/RowThree.qml b/multilayer-dashboard/RowThree.qml
index 0b60dcf..6af378d 100644
--- a/multilayer-dashboard/RowThree.qml
+++ b/multilayer-dashboard/RowThree.qml
@@ -42,14 +42,19 @@ import Qt 4.7
import Qt.labs.gestures 1.0
Rectangle {
- width: 200
id: myRow
+ width: 200
+ height: 340
+
property variant reparentWidget: myRow
property variant topLevel: myRow
- Rectangle {
+ Column {
id: tapWidgetContainer
+ width: parent.width
+ height: parent.height
+ spacing: 2
TapWidget {
x: 10
@@ -59,37 +64,27 @@ Rectangle {
}
TapWidget {
x:10
- anchors.top : firstWidget.bottom
- anchors.topMargin : 2.0
id: secondWidget
color: "blue"
reparentWidget: myRow.reparentWidget
}
TapWidget {
x:10
- anchors.top : secondWidget.bottom
- anchors.topMargin : 2.0
id: thirdWidget
reparentWidget: myRow.reparentWidget
}
TapWidget {
x:10
- anchors.top : thirdWidget.bottom
- anchors.topMargin : 2.0
id: fourthWidget
reparentWidget: myRow.reparentWidget
}
TapWidget {
x:10
- anchors.top : fourthWidget.bottom
- anchors.topMargin : 2.0
id: fifthWidget
reparentWidget: myRow.reparentWidget
}
TapWidget {
x:10
- anchors.top : fifthWidget.bottom
- anchors.topMargin : 2.0
id: sixthWidget
reparentWidget: myRow.reparentWidget
}
@@ -100,7 +95,7 @@ Rectangle {
property int minY : (tapWidgetContainer.childrenRect.height > topLevel.height) ?
-(tapWidgetContainer.childrenRect.height - topLevel.height) :
0
- } // end Rectangle
+ }
GestureArea {
id: rowGestureArea
@@ -119,6 +114,5 @@ Rectangle {
}
}
}
- } // end GestureArea
-
+ }
}
diff --git a/multilayer-dashboard/RowTwo.qml b/multilayer-dashboard/RowTwo.qml
index 171b078..ab68490 100644
--- a/multilayer-dashboard/RowTwo.qml
+++ b/multilayer-dashboard/RowTwo.qml
@@ -42,14 +42,18 @@ import Qt 4.7
import Qt.labs.gestures 1.0
Rectangle {
+ id: myRow
+
width: 200
height: 340
- id: myRow
+
property variant reparentWidget: myRow
property variant topLevel: myRow
Column {
id: tapWidgetContainer
+ width: parent.width
+ height: parent.height
spacing: 2
ExpandableWidget {
@@ -162,6 +166,5 @@ Rectangle {
}
}
}
- } // end GestureArea
-
+ }
}