summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/samegame/samegame2/Button.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame2/Button.qml')
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Button.qml11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml
index a7853d4..cf4c61b 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml
@@ -1,4 +1,4 @@
-import Qt 4.6
+import Qt 4.7
Rectangle {
id: container
@@ -7,19 +7,20 @@ Rectangle {
property string text: "Button"
color: activePalette.button; smooth: true
- width: txtItem.width + 20; height: txtItem.height + 6
+ width: buttonLabel.width + 20; height: buttonLabel.height + 6
border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8;
gradient: Gradient {
GradientStop {
- id: topGrad; position: 0.0
- color: if (mouseArea.pressed) { activePalette.dark } else { activePalette.light } }
+ position: 0.0
+ color: if (mouseArea.pressed) { activePalette.dark } else { activePalette.light }
+ }
GradientStop { position: 1.0; color: activePalette.button }
}
MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() }
Text {
- id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
+ id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
}
}