diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-07-28 03:44:39 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-07-28 03:44:39 (GMT) |
commit | a4f00b20910a345cb0d6feb4916faac65957c9e1 (patch) | |
tree | d4736ca1ce210655110020099553416471004c13 /demos/declarative | |
parent | 0cdd8518090be320fa89efaa11ced32215cc2ccc (diff) | |
download | Qt-a4f00b20910a345cb0d6feb4916faac65957c9e1.zip Qt-a4f00b20910a345cb0d6feb4916faac65957c9e1.tar.gz Qt-a4f00b20910a345cb0d6feb4916faac65957c9e1.tar.bz2 |
Missed a few files in the new samegame
Button and Dialog qml files were missed in the first commit
Diffstat (limited to 'demos/declarative')
-rw-r--r-- | demos/declarative/samegame/content/Button.qml | 18 | ||||
-rw-r--r-- | demos/declarative/samegame/content/Dialog.qml | 15 |
2 files changed, 33 insertions, 0 deletions
diff --git a/demos/declarative/samegame/content/Button.qml b/demos/declarative/samegame/content/Button.qml new file mode 100644 index 0000000..2f38a52 --- /dev/null +++ b/demos/declarative/samegame/content/Button.qml @@ -0,0 +1,18 @@ +import Qt 4.6 + +Rect { + id: page; color: activePalette.button; width: txtItem.width+20; height: txtItem.height+4 + pen.width: 1; pen.color: activePalette.mid; radius: 10; + signal clicked + property string text: "Button" + gradient: Gradient { + GradientStop { id:topGrad; position: 0.0; + color: if(mr.pressed){activePalette.dark;}else{activePalette.light;}} + GradientStop { position: 1.0; color: activePalette.button } + } + MouseRegion { id:mr; anchors.fill: parent; onClicked: page.clicked() } + Text { + id: txtItem; text: page.text; anchors.centeredIn: page; color: activePalette.buttonText + font.size: 14; + } +} diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml new file mode 100644 index 0000000..6d12b48 --- /dev/null +++ b/demos/declarative/samegame/content/Dialog.qml @@ -0,0 +1,15 @@ +import Qt 4.6 + +Rect { + id: page + color: "white"; pen.width: 1; width: 200; height: 60; + property string text: "Hello World!" + opacity: 0 + opacity: Behavior { + SequentialAnimation { + NumberAnimation {property: "opacity"; from: 0; duration: 1500 } + NumberAnimation {property: "opacity"; to: 0; duration: 1500 } + } + } + Text { anchors.centeredIn: parent; text: parent.text } +} |