summaryrefslogtreecommitdiffstats
path: root/res/qml/Knob.qml
diff options
context:
space:
mode:
Diffstat (limited to 'res/qml/Knob.qml')
-rw-r--r--res/qml/Knob.qml58
1 files changed, 58 insertions, 0 deletions
diff --git a/res/qml/Knob.qml b/res/qml/Knob.qml
new file mode 100644
index 0000000000..8405716bb0
--- /dev/null
+++ b/res/qml/Knob.qml
@@ -0,0 +1,58 @@
+import Mixxx.Controls 0.1 as MixxxControls
+import QtQuick 2.12
+import "Theme"
+
+MixxxControls.Knob {
+ id: root
+
+ property color color // required
+ property url shadowSource: Theme.imgKnobShadow
+ property url backgroundSource: Theme.imgKnob
+
+ implicitWidth: background.width
+ implicitHeight: implicitWidth
+ arc: true
+ arcRadius: width * 0.45
+ arcOffsetY: width * 0.01
+ arcColor: root.color
+ arcWidth: 2
+ angle: 116
+
+ Image {
+ id: shadow
+
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: width * 7 / 6
+ fillMode: Image.PreserveAspectFit
+ source: root.shadowSource
+ }
+
+ background: Image {
+ id: background
+
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: width
+ source: root.backgroundSource
+ }
+
+ foreground: Item {
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: width
+
+ Rectangle {
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: 2
+ height: root.width / 5
+ y: height
+ color: root.color
+ }
+
+ }
+
+}