Skip to content

Commit

Permalink
skins/QMLDemo: Add EQ kill buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed May 31, 2021
1 parent a33a699 commit b295d62
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 5 deletions.
15 changes: 10 additions & 5 deletions res/skins/QMLDemo/EqColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,34 @@ Column {

spacing: 4

Knob {
EqKnob {
group: "[EqualizerRack1_" + root.group + "_Effect1]"
key: "parameter3"
statusKey: "button_parameter3"
color: Theme.eqHighColor
}

Knob {
EqKnob {
group: "[EqualizerRack1_" + root.group + "_Effect1]"
key: "parameter2"
statusKey: "button_parameter2"
color: Theme.eqMidColor
}

Knob {
EqKnob {
group: "[EqualizerRack1_" + root.group + "_Effect1]"
key: "parameter1"
statusKey: "button_parameter1"
color: Theme.eqLowColor
}

Knob {
EqKnob {
group: "[QuickEffectRack1_" + root.group + "]"
key: "super1"
statusGroup: "[QuickEffectRack1_" + root.group + "_Effect1]"
statusKey: "enabled"
arcStyle: ShapePath.DashLine
arcStylePattern: [2, 2]
key: "super1"
color: Theme.eqFxColor
}

Expand Down
69 changes: 69 additions & 0 deletions res/skins/QMLDemo/EqKnob.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import Mixxx 0.1 as Mixxx
import Mixxx.Controls 0.1 as MixxxControls
import QtQuick 2.12
import "Theme"

MixxxControls.Knob {
id: root

property color color // required
property string statusGroup: root.group // required
property string statusKey // required

implicitWidth: 56
implicitHeight: width
arc: true
arcRadius: 20
arcColor: root.color
arcWidth: 2
angle: 117

Mixxx.ControlProxy {
id: statusControl

group: root.statusGroup
key: root.statusKey
}

Rectangle {
id: statusButton

anchors.left: root.left
anchors.bottom: root.bottom
anchors.leftMargin: 6
anchors.bottomMargin: 2
width: 8
height: width
radius: width / 2
border.width: 1
border.color: Theme.buttonNormalColor
color: statusControl.value ? root.color : "transparent"

MouseArea {
anchors.fill: parent
onClicked: statusControl.value = !statusControl.value
}

}

background: Image {
anchors.left: parent.left
anchors.top: parent.top
anchors.right: parent.right
source: "images/knob.svg"
}

foreground: Item {
anchors.fill: parent

Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
width: root.width / 30
height: root.width / 7
y: parent.height / 4
color: root.color
}

}

}

0 comments on commit b295d62

Please sign in to comment.