diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-05-18 07:43:20 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-05-18 07:45:10 (GMT) |
commit | f4492bf01baae353ff63da18a9a602fb3a8058e4 (patch) | |
tree | dd26f922483ad4905cb2b0b38d2b9097dbf6178c /examples/declarative/toys/dynamicscene/qml/Button.qml | |
parent | ba9218a9786abddd461034b5aeb1d5a39f8072f9 (diff) | |
download | Qt-f4492bf01baae353ff63da18a9a602fb3a8058e4.zip Qt-f4492bf01baae353ff63da18a9a602fb3a8058e4.tar.gz Qt-f4492bf01baae353ff63da18a9a602fb3a8058e4.tar.bz2 |
Rename some examples: proxyviewer -> networkaccessmanagerfactory,
proxywidgets -> qwidgets, dynamic -> dynamicscene, velocity -> corkboards
Diffstat (limited to 'examples/declarative/toys/dynamicscene/qml/Button.qml')
-rw-r--r-- | examples/declarative/toys/dynamicscene/qml/Button.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/declarative/toys/dynamicscene/qml/Button.qml b/examples/declarative/toys/dynamicscene/qml/Button.qml new file mode 100644 index 0000000..963a850 --- /dev/null +++ b/examples/declarative/toys/dynamicscene/qml/Button.qml @@ -0,0 +1,40 @@ +import Qt 4.7 + +Rectangle { + id: container + + property variant text + signal clicked + + height: text.height + 10; width: text.width + 20 + border.width: 1 + radius: 4 + smooth: true + + gradient: Gradient { + GradientStop { + position: 0.0 + color: !mouseArea.pressed ? activePalette.light : activePalette.button + } + GradientStop { + position: 1.0 + color: !mouseArea.pressed ? activePalette.button : activePalette.dark + } + } + + SystemPalette { id: activePalette } + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: container.clicked() + } + + Text { + id: text + anchors.centerIn:parent + font.pointSize: 10 + text: parent.text + color: activePalette.buttonText + } +} |