diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-04-13 05:32:45 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-04-13 05:32:45 (GMT) |
commit | a34993a9d8d1b9b3f3ad30604dbad3ad456bbdcd (patch) | |
tree | 28c4fc3995172d8c885454839acdbd60b8a28ac0 /examples/declarative/tic-tac-toe/content | |
parent | 61c13dad7bf04642033f01cad81ea422ab89b122 (diff) | |
parent | 7fba97dc74a27f836abfcf4941dac6e247379798 (diff) | |
download | Qt-a34993a9d8d1b9b3f3ad30604dbad3ad456bbdcd.zip Qt-a34993a9d8d1b9b3f3ad30604dbad3ad456bbdcd.tar.gz Qt-a34993a9d8d1b9b3f3ad30604dbad3ad456bbdcd.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'examples/declarative/tic-tac-toe/content')
-rw-r--r-- | examples/declarative/tic-tac-toe/content/Button.qml | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/examples/declarative/tic-tac-toe/content/Button.qml b/examples/declarative/tic-tac-toe/content/Button.qml index 05d3f8d..56e5ecd 100644 --- a/examples/declarative/tic-tac-toe/content/Button.qml +++ b/examples/declarative/tic-tac-toe/content/Button.qml @@ -3,33 +3,37 @@ import Qt 4.7 Rectangle { id: container - signal clicked property string text: "Button" property bool down: false property string mainCol: "lightgray" property string darkCol: "darkgray" property string lightCol: "white" - color: mainCol; smooth: true width: txtItem.width + 20; height: txtItem.height + 6 - border.width: 1; border.color: Qt.darker(mainCol); radius: 8; + border { width: 1; color: Qt.darker(mainCol) } + radius: 8; + color: mainCol + smooth: true gradient: Gradient { GradientStop { id: topGrad; position: 0.0 - color: if (container.down) { darkCol } else { lightCol } } + color: if (container.down) { darkCol } else { lightCol } + } GradientStop { position: 1.0; color: mainCol } } + signal clicked + MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: container.text; + id: txtItem + anchors.centerIn: container + text: container.text; color: "blue" - styleColor: "white" - style: Text.Outline - font.pixelSize: 14 - font.bold: true + style: Text.Outline; styleColor: "white" + font.pixelSize: 14; font.bold: true } } |