aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarko Niemelä <marko.a.niemela@nokia.com>2012-01-24 16:32:49 +0200
committerMarko Niemelä <marko.a.niemela@nokia.com>2012-01-24 16:32:49 +0200
commite170553a7956948b035e8532f3ae15b9d4d540dc (patch)
tree55a75477e6ec2dfc95dcd22462bd2cbeb6699dc5 /tests
parentbcfd0c2da2bc765fe0f46dbe8caf4b2d30213501 (diff)
TestBed BGColorPicker amout of hardcoded values reduced
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/testbed/BGColorPicker.qml24
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/manual/testbed/BGColorPicker.qml b/tests/manual/testbed/BGColorPicker.qml
index ede5c8c..10caac8 100644
--- a/tests/manual/testbed/BGColorPicker.qml
+++ b/tests/manual/testbed/BGColorPicker.qml
@@ -44,15 +44,18 @@ Label {
id: bgColorPicker
property color color: "#242424"
caption: "Background color"
+
Image {
id: highlight
source: "images/color_selection_hl.png"
- width: 18; height: 18;
- x: 37
- y: 0
+ width: 14
+ height: 14
+ x: initial.x - (highlight.width - initial.width) * 0.5
+ y: selection.y - (highlight.height - selection.height) * 0.5
}
Row {
+ id: selection
y: 3
spacing: 8
Rectangle { width: 12; height: 12; color: "#ffffff"
@@ -60,7 +63,7 @@ Label {
anchors.fill: parent
onClicked: {
bgColorPicker.color = parent.color
- highlight.x = parent.x - 3
+ highlight.x = parent.x - (highlight.width - parent.width) * 0.5
}
}
}
@@ -69,16 +72,16 @@ Label {
anchors.fill: parent
onClicked: {
bgColorPicker.color = parent.color
- highlight.x = parent.x - 3
+ highlight.x = parent.x - (highlight.width - parent.width) * 0.5
}
}
}
- Rectangle { width: 12; height: 12; color: "#242424"
+ Rectangle { id: initial; width: 12; height: 12; color: "#242424"
MouseArea {
anchors.fill: parent
onClicked: {
bgColorPicker.color = parent.color
- highlight.x = parent.x - 3
+ highlight.x = parent.x - (highlight.width - parent.width) * 0.5
}
}
}
@@ -87,16 +90,17 @@ Label {
anchors.fill: parent
onClicked: {
bgColorPicker.color = parent.color
- highlight.x = parent.x - 3
+ highlight.x = parent.x - (highlight.width - parent.width) * 0.5
}
}
}
- Image {source: "images/background.png"
+ Image { source: "images/background.png"
+ width: 12; height: 12;
MouseArea {
anchors.fill: parent
onClicked: {
bgColorPicker.color = "#010101"
- highlight.x = parent.x - 3
+ highlight.x = parent.x - (highlight.width - parent.width) * 0.5
}
}
}