diff options
author | Be <be@mixxx.org> | 2021-09-27 14:54:14 -0500 |
---|---|---|
committer | Be <be@mixxx.org> | 2021-09-29 10:11:33 -0500 |
commit | d4bf033f4f16d811040ddb44a5bccc882e738c48 (patch) | |
tree | d05c7a52e9ca73205f3a8d4ded1914993aaf38fc /res/qml/ControlButton.qml | |
parent | 9b7f745691fe8f21af29ca64dd44a7c42651f953 (diff) |
move res/skins/QMLDemo to res/qml
Diffstat (limited to 'res/qml/ControlButton.qml')
-rw-r--r-- | res/qml/ControlButton.qml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/res/qml/ControlButton.qml b/res/qml/ControlButton.qml new file mode 100644 index 0000000000..6a44ef06e2 --- /dev/null +++ b/res/qml/ControlButton.qml @@ -0,0 +1,35 @@ +import "." as Skin +import Mixxx 0.1 as Mixxx + +Skin.Button { + id: root + + property string group // required + property string key // required + property bool toggleable: false + + function toggle() { + control.value = !control.value; + } + + highlight: control.value + onPressed: { + if (toggleable) + toggle(); + else + control.value = 1; + } + onReleased: { + if (!toggleable) + control.value = 0; + + } + + Mixxx.ControlProxy { + id: control + + group: root.group + key: root.key + } + +} |