diff options
author | Lubos Dolezel <lubos@dolezel.info> | 2015-06-08 23:53:43 +0200 |
---|---|---|
committer | Lubos Dolezel <lubos@dolezel.info> | 2015-06-08 23:54:33 +0200 |
commit | a12e6ec5597528fe77cbbdd9ac42308c3147f7d5 (patch) | |
tree | ddd98b192a0624c9f53dd55542ae0ab2bc90defd /src/gui/qml/ImageButton.qml | |
parent | b777beb72c0b5877039da813c29a76b472a40842 (diff) | |
download | twinkle-a12e6ec5597528fe77cbbdd9ac42308c3147f7d5.tar twinkle-a12e6ec5597528fe77cbbdd9ac42308c3147f7d5.tar.gz twinkle-a12e6ec5597528fe77cbbdd9ac42308c3147f7d5.tar.lz twinkle-a12e6ec5597528fe77cbbdd9ac42308c3147f7d5.tar.xz twinkle-a12e6ec5597528fe77cbbdd9ac42308c3147f7d5.zip |
Added OSD with mute and hangup buttons (resolves #10)
Diffstat (limited to 'src/gui/qml/ImageButton.qml')
-rw-r--r-- | src/gui/qml/ImageButton.qml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gui/qml/ImageButton.qml b/src/gui/qml/ImageButton.qml new file mode 100644 index 0000000..3d76fa7 --- /dev/null +++ b/src/gui/qml/ImageButton.qml @@ -0,0 +1,28 @@ +import QtQuick 1.1 + +Rectangle { + + property alias image: img.source + signal clicked + + color: "transparent" + z: 2 + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: parent.clicked() + } + + Image { + id: img + smooth: true + anchors.fill: parent + } + + states: State { + name: "pressed"; when: mouseArea.pressed + PropertyChanges { target: img; anchors.topMargin: 2; anchors.bottomMargin: -2 } + } +} + |