From d4bf033f4f16d811040ddb44a5bccc882e738c48 Mon Sep 17 00:00:00 2001 From: Be Date: Mon, 27 Sep 2021 14:54:14 -0500 Subject: move res/skins/QMLDemo to res/qml --- res/qml/ControlButton.qml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 res/qml/ControlButton.qml (limited to 'res/qml/ControlButton.qml') 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 + } + +} -- cgit v1.2.3