diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-04-22 04:47:24 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-04-22 04:47:24 (GMT) |
commit | 2366667fc97eb6a56203b2dd7dac776ff4164abd (patch) | |
tree | b2acb6cc6bfe475d7e619e4788973b61fff775e0 /demos/declarative/mediabrowser/content/MediaButton.qml | |
parent | 2c762f3b8b284a7c6dc0c499b7052013bad5b707 (diff) | |
download | Qt-2366667fc97eb6a56203b2dd7dac776ff4164abd.zip Qt-2366667fc97eb6a56203b2dd7dac776ff4164abd.tar.gz Qt-2366667fc97eb6a56203b2dd7dac776ff4164abd.tar.bz2 |
Initial import of kinetic-dui branch from the old kinetic
Diffstat (limited to 'demos/declarative/mediabrowser/content/MediaButton.qml')
-rw-r--r-- | demos/declarative/mediabrowser/content/MediaButton.qml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/demos/declarative/mediabrowser/content/MediaButton.qml b/demos/declarative/mediabrowser/content/MediaButton.qml new file mode 100644 index 0000000..c92305a --- /dev/null +++ b/demos/declarative/mediabrowser/content/MediaButton.qml @@ -0,0 +1,21 @@ +<Item id="Container"> + <signals> + <Signal name="clicked"/> + </signals> + + <properties> + <Property name="text"/> + </properties> + + <Image id="Image" src="pics/button.png"/> + <Image id="Pressed" src="pics/button-pressed.png" opacity="0"/> + <MouseRegion id="MouseRegion" anchors.fill="{Image}" onClicked="Container.clicked.emit();"/> + <Text font.bold="true" color="white" anchors.centeredIn="{Image}" text="{Container.text}"/> + <width>{Image.width}</width> + + <states> + <State name="Pressed" when="{MouseRegion.pressed == true}"> + <SetProperties target="{Pressed}" opacity="1"/> + </State> + </states> +</Item> |