Skip to content

Commit 2ccaac4

Browse files
committed
LateNightQML: fix mixer layout when EQ kills are hidden
1 parent 0ccbedb commit 2ccaac4

8 files changed

Lines changed: 719 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import Mixxx 1.0 as Mixxx
2+
import QtQuick
3+
import "../LateNightTheme"
4+
5+
Item {
6+
id: root
7+
8+
required property string group
9+
required property url iconSource
10+
required property string key
11+
12+
implicitHeight: 18
13+
implicitWidth: 18
14+
15+
property alias value: killControl.value
16+
17+
function toggle() {
18+
killControl.value = killControl.value > 0 ? 0 : 1;
19+
}
20+
21+
Rectangle {
22+
anchors.fill: parent
23+
border.color: "#050505"
24+
border.width: 2
25+
color: killControl.value > 0 ? LateNightTheme.mixerEqKillActiveColor : "#111113"
26+
}
27+
Image {
28+
anchors.centerIn: parent
29+
fillMode: Image.PreserveAspectFit
30+
height: 18
31+
source: root.iconSource
32+
visible: killControl.value <= 0
33+
width: 18
34+
}
35+
MouseArea {
36+
anchors.fill: parent
37+
38+
onClicked: killControl.value = killControl.value > 0 ? 0 : 1
39+
}
40+
Mixxx.ControlProxy {
41+
id: killControl
42+
43+
group: root.group
44+
key: root.key
45+
}
46+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import Mixxx 1.0 as Mixxx
2+
import QtQuick
3+
import "../Controls" as LateNightControls
4+
import "../LateNightTheme"
5+
6+
Item {
7+
id: root
8+
9+
readonly property string effectButtonKey: "button_" + effectParameterKey
10+
readonly property string effectGroup: "[EqualizerRack1_" + group + "_Effect1]"
11+
readonly property string effectParameterKey: root.key === "filterLow" ? "parameter1" : (root.key === "filterMid" ? "parameter2" : "parameter3")
12+
required property string group
13+
required property string key
14+
required property url killIcon
15+
property bool mirror: false
16+
property bool showKill: true
17+
18+
implicitHeight: 34
19+
implicitWidth: 58
20+
21+
EqKillButton {
22+
id: eqKillButton
23+
24+
anchors.left: root.mirror ? undefined : parent.left
25+
anchors.right: root.mirror ? parent.right : undefined
26+
anchors.verticalCenter: parent.verticalCenter
27+
group: root.effectGroup
28+
iconSource: root.killIcon
29+
key: root.effectButtonKey
30+
visible: root.showKill
31+
}
32+
LateNightControls.Knob {
33+
id: eqKnob
34+
35+
anchors.left: root.mirror ? parent.left : undefined
36+
anchors.right: root.mirror ? undefined : parent.right
37+
anchors.verticalCenter: parent.verticalCenter
38+
backgroundSource: LateNightTheme.assetRegularKnobBackground
39+
displayArc: true
40+
displayArcColor: LateNightTheme.mixerArcEqColor
41+
displayArcRadius: LateNightTheme.mixerArcRadiusBig
42+
displayArcStart: LateNightControls.Knob.ArcStart.Center
43+
displayArcWidth: LateNightTheme.mixerArcWidth
44+
group: root.effectGroup
45+
height: 34
46+
indicatorColor: LateNightTheme.isClassic ? "white" : "grey"
47+
indicatorKind: "regular"
48+
key: root.effectParameterKey
49+
width: 40
50+
}
51+
Image {
52+
id: statusDot
53+
54+
height: 9
55+
source: eqKillButton.value > 0 ? LateNightTheme.assetMixerEqKillDotActiveRed : LateNightTheme.assetMixerEqKillDotOff
56+
visible: !root.showKill && root.visible
57+
width: 9
58+
x: root.mirror ? eqKnob.x + 32 : eqKnob.x
59+
y: 27
60+
61+
MouseArea {
62+
anchors.fill: parent
63+
64+
onClicked: eqKillButton.toggle()
65+
}
66+
}
67+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import QtQuick
2+
import QtQuick.Layouts
3+
import "../LateNightTheme"
4+
5+
Column {
6+
id: root
7+
8+
property bool alignRight: false
9+
required property string group
10+
property bool showEqKillButtons: true
11+
property bool showEqKnobs: true
12+
13+
spacing: 2
14+
15+
EqKnobRow {
16+
group: root.group
17+
key: "filterHigh"
18+
killIcon: LateNightTheme.assetMixerEqKillHighIcon
19+
mirror: root.alignRight
20+
showKill: root.showEqKillButtons
21+
visible: root.showEqKnobs
22+
}
23+
EqKnobRow {
24+
group: root.group
25+
key: "filterMid"
26+
killIcon: LateNightTheme.assetMixerEqKillMidIcon
27+
mirror: root.alignRight
28+
showKill: root.showEqKillButtons
29+
visible: root.showEqKnobs
30+
}
31+
EqKnobRow {
32+
group: root.group
33+
key: "filterLow"
34+
killIcon: LateNightTheme.assetMixerEqKillLowIcon
35+
mirror: root.alignRight
36+
showKill: root.showEqKillButtons
37+
visible: root.showEqKnobs
38+
}
39+
QuickEffectRow {
40+
group: root.group
41+
mirror: root.alignRight
42+
showEqKillButtons: root.showEqKillButtons
43+
}
44+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import QtQuick
2+
import "../Controls" as LateNightControls
3+
import "../LateNightTheme"
4+
5+
Item {
6+
id: root
7+
8+
required property string group
9+
property bool mirror: false
10+
property bool showEqKillButtons: true
11+
property bool showEqKnobs: true
12+
13+
implicitHeight: 203
14+
implicitWidth: root.showEqKillButtons ? 109 : 91
15+
16+
Item {
17+
anchors.left: root.mirror ? parent.left : undefined
18+
anchors.right: root.mirror ? undefined : parent.right
19+
height: parent.height
20+
width: 109
21+
22+
EqQuickColumn {
23+
id: eqColumn
24+
25+
alignRight: root.mirror
26+
group: root.group
27+
showEqKillButtons: root.showEqKillButtons
28+
showEqKnobs: root.showEqKnobs
29+
x: root.mirror ? 42 : 0
30+
y: 10
31+
}
32+
LateNightControls.Fader {
33+
backgroundSource: LateNightTheme.assetMixerVolumeSliderBackground
34+
group: root.group
35+
handleSource: LateNightTheme.assetMixerVolumeSliderHandle
36+
height: 107
37+
key: "volume"
38+
orientation: Qt.Vertical
39+
width: 42
40+
x: root.mirror ? 3 : 64
41+
y: 49
42+
}
43+
QuickEffectSelector {
44+
arrowOnRight: root.mirror
45+
group: root.group
46+
visible: root.showEqKnobs
47+
width: root.showEqKillButtons ? 62 : 40
48+
x: root.mirror ? 42 : (root.showEqKillButtons ? 5 : 18)
49+
y: 156
50+
}
51+
Row {
52+
visible: root.showEqKnobs
53+
x: root.mirror ? 46 : 22
54+
y: 180
55+
56+
CrossfaderAssignButton {
57+
activeStyle: root.mirror ? "warning" : "default"
58+
group: root.group
59+
label: "left"
60+
side: 0
61+
}
62+
CrossfaderAssignButton {
63+
activeStyle: "warning"
64+
group: root.group
65+
label: "mid"
66+
side: 1
67+
}
68+
CrossfaderAssignButton {
69+
activeStyle: root.mirror ? "default" : "warning"
70+
group: root.group
71+
label: "right"
72+
side: 2
73+
}
74+
}
75+
}
76+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
import QtQuick
2+
import "../Controls" as LateNightControls
3+
import "../LateNightTheme"
4+
5+
Item {
6+
id: root
7+
8+
required property string group
9+
property string leftStyle: "default"
10+
property string rightStyle: "default"
11+
property bool showEqKillButtons: true
12+
property bool showEqKnobs: true
13+
14+
implicitHeight: 405
15+
implicitWidth: root.showEqKillButtons ? 62 : 44
16+
17+
Item {
18+
anchors.right: parent.right
19+
width: 62
20+
height: parent.height
21+
22+
LateNightControls.Knob {
23+
backgroundSource: LateNightTheme.assetRegularKnobBackground
24+
displayArc: true
25+
displayArcColor: LateNightTheme.mixerArcGainColor
26+
displayArcRadius: LateNightTheme.mixerArcRadiusBig
27+
displayArcStart: LateNightControls.Knob.ArcStart.Center
28+
displayArcWidth: LateNightTheme.mixerArcWidth
29+
group: root.group
30+
height: 34
31+
indicatorColor: "orange"
32+
indicatorKind: "regular"
33+
key: "pregain"
34+
width: 40
35+
x: 18
36+
y: 4
37+
}
38+
EqKnobRow {
39+
group: root.group
40+
key: "filterHigh"
41+
killIcon: LateNightTheme.assetMixerEqKillHighIcon
42+
showKill: root.showEqKillButtons
43+
visible: root.showEqKnobs
44+
width: 58
45+
x: 0
46+
y: 43
47+
}
48+
EqKnobRow {
49+
group: root.group
50+
key: "filterMid"
51+
killIcon: LateNightTheme.assetMixerEqKillMidIcon
52+
showKill: root.showEqKillButtons
53+
visible: root.showEqKnobs
54+
width: 58
55+
x: 0
56+
y: 80
57+
}
58+
EqKnobRow {
59+
group: root.group
60+
key: "filterLow"
61+
killIcon: LateNightTheme.assetMixerEqKillLowIcon
62+
showKill: root.showEqKillButtons
63+
visible: root.showEqKnobs
64+
width: 58
65+
x: 0
66+
y: 117
67+
}
68+
QuickEffectRow {
69+
group: root.group
70+
width: 58
71+
x: 0
72+
y: 154
73+
}
74+
QuickEffectSelector {
75+
group: root.group
76+
visible: root.showEqKnobs
77+
width: 62
78+
x: 0
79+
y: 188
80+
}
81+
PflButton {
82+
group: root.group
83+
x: 28
84+
y: 210
85+
}
86+
LateNightControls.ImageVuMeter {
87+
group: root.group
88+
height: 96
89+
width: 20
90+
x: 0
91+
y: 237
92+
}
93+
LateNightControls.Fader {
94+
backgroundSource: LateNightTheme.assetMixerVolumeSliderBackground
95+
group: root.group
96+
handleSource: LateNightTheme.assetMixerVolumeSliderHandle
97+
height: 107
98+
key: "volume"
99+
orientation: Qt.Vertical
100+
width: 42
101+
x: 20
102+
y: 237
103+
}
104+
CrossfaderAssignButton {
105+
activeStyle: root.leftStyle
106+
group: root.group
107+
label: "left"
108+
side: 0
109+
x: 14
110+
y: 344
111+
}
112+
CrossfaderAssignButton {
113+
activeStyle: "warning"
114+
group: root.group
115+
label: "mid"
116+
side: 1
117+
x: 25
118+
y: 344
119+
}
120+
CrossfaderAssignButton {
121+
activeStyle: root.rightStyle
122+
group: root.group
123+
label: "right"
124+
side: 2
125+
x: 36
126+
y: 344
127+
}
128+
}
129+
}

0 commit comments

Comments
 (0)