diff options
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame2/Button.qml')
-rw-r--r-- | examples/declarative/tutorials/samegame/samegame2/Button.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml index 64a8a5a..04d1d1f 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml @@ -7,12 +7,12 @@ 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 + position: 0.0 color: if (mouseArea.pressed) { activePalette.dark } else { activePalette.light } } GradientStop { position: 1.0; color: activePalette.button } } @@ -20,6 +20,6 @@ Rectangle { 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 } } |