Skip to content

Commit 6861d75

Browse files
committed
LateNightQML: refine configurable mixer layouts
1 parent 3145e1c commit 6861d75

11 files changed

Lines changed: 69 additions & 116 deletions

File tree

res/skins/LateNightQML/Controls/Fader.qml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ Skin.ControlFader {
77

88
property int backgroundMargin: 0
99
property alias backgroundSource: backgroundImage.source
10-
property bool centeredBar: false
11-
property real centeredBarAxis: height / 2
1210
property alias handleSource: handleImage.source
1311
property color valueLineColor: LateNightTheme.mixerSliderBarColor
1412

1513
bar.color: valueLineColor
16-
bar.enabled: !centeredBar
14+
bar.enabled: true
1715
bar.margin: 8
1816
bar.width: 2
1917
implicitHeight: backgroundImage.implicitHeight + (backgroundMargin * 2)
@@ -36,18 +34,4 @@ Skin.ControlFader {
3634
x: root.horizontal ? root.visualPosition * (root.width - width) : (root.width - width) / 2
3735
y: root.vertical ? root.visualPosition * (root.height - height) : (root.height - height) / 2
3836
}
39-
40-
Rectangle {
41-
readonly property real handleCenter: handleImage.x + handleImage.width / 2
42-
readonly property real start: root.width / 2
43-
44-
color: root.valueLineColor
45-
height: root.bar.width
46-
radius: height / 2
47-
visible: root.centeredBar && root.horizontal && width > 0
48-
width: Math.abs(handleCenter - start)
49-
x: Math.min(start, handleCenter)
50-
y: root.centeredBarAxis - height / 2
51-
z: 1
52-
}
5337
}

res/skins/LateNightQML/LateNightTheme/LateNightTheme.qml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ QtObject {
6565
readonly property url assetMixerCrossfaderBackground: lateNightAsset("sliders", "slider_crossfader.svg")
6666
readonly property url assetMixerCrossfaderHandle: lateNightAsset("sliders", "knob_crossfader.svg")
6767
readonly property url assetMixerCrossfaderSmallBackground: lateNightAsset("sliders", "slider_crossfader_small.svg")
68-
readonly property url assetMixerEqKillDotActiveGreen: isPaleMoon ? lateNightAsset("buttons", "btn__eq_kill_dot_active_green.svg") : ""
69-
readonly property url assetMixerEqKillDotActiveRed: isPaleMoon ? lateNightAsset("buttons", "btn__eq_kill_dot_active_red.svg") : ""
70-
readonly property url assetMixerEqKillDotOff: isPaleMoon ? lateNightAsset("buttons", "btn__eq_kill_dot_off.svg") : ""
7168
readonly property url assetMixerEqKillHighIcon: lateNightAsset("buttons", "btn__eq_kill_high.svg")
7269
readonly property url assetMixerEqKillLowIcon: lateNightAsset("buttons", "btn__eq_kill_low.svg")
7370
readonly property url assetMixerEqKillMidIcon: lateNightAsset("buttons", "btn__eq_kill_mid.svg")
@@ -121,6 +118,8 @@ QtObject {
121118
readonly property color mixerControlTextColor: isClassic ? "#d2d2d1" : "#a7998b"
122119
readonly property color mixerDimTextColor: "#696969"
123120
readonly property color mixerEqKillActiveColor: isClassic ? "#db0000" : "#a80000"
121+
readonly property color mixerMainSeparatorDarkColor: isPaleMoon ? "#0c0c0c" : mixerPanelBorderDark
122+
readonly property color mixerMainSeparatorLightColor: isPaleMoon ? "#222222" : mixerPanelBorderLight
124123
readonly property color mixerPanelBorderDark: "#080808"
125124
readonly property color mixerPanelBorderLight: "#343434"
126125
readonly property color mixerPanelColor: "#1d1d1f"
@@ -133,6 +132,9 @@ QtObject {
133132
readonly property url optionalDeckControlsBackgroundTile: isClassic ? lateNightAsset("style", "background_tile.png") : ""
134133
readonly property url optionalDeckRateCenterActive: isPaleMoon ? lateNightAsset("buttons", "btn__rate_center_cyan.svg") : ""
135134
readonly property url optionalDeckRateCenterInactive: isPaleMoon ? lateNightAsset("buttons", "btn__rate_center_off.svg") : ""
135+
readonly property url optionalMixerEqKillDotActiveGreen: isPaleMoon ? lateNightAsset("buttons", "btn__eq_kill_dot_active_green.svg") : ""
136+
readonly property url optionalMixerEqKillDotActiveRed: isPaleMoon ? lateNightAsset("buttons", "btn__eq_kill_dot_active_red.svg") : ""
137+
readonly property url optionalMixerEqKillDotOff: isPaleMoon ? lateNightAsset("buttons", "btn__eq_kill_dot_off.svg") : ""
136138
readonly property color overviewBorderBottomColor: "#2a2a2a"
137139
readonly property color overviewBorderLeftColor: "#121212"
138140
readonly property color overviewBorderRightColor: "#252525"

res/skins/LateNightQML/Mixer/Crossfader.qml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Item {
1818
backgroundSource: root.compact ? LateNightTheme.assetMixerCrossfaderSmallBackground : LateNightTheme.assetMixerCrossfaderBackground
1919
bar.margin: 7
2020
bar.start: 0.5
21-
centeredBar: true
22-
centeredBarAxis: 19
2321
group: "[Master]"
2422
handleSource: LateNightTheme.assetMixerCrossfaderHandle
2523
height: implicitHeight
@@ -36,30 +34,12 @@ Item {
3634
Repeater {
3735
model: root.groups.length
3836

39-
Row {
40-
property string assignmentGroup: root.groups[index]
37+
CrossfaderAssignButton {
4138
required property int index
4239

43-
spacing: 0
44-
45-
CrossfaderAssignButton {
46-
activeStyle: index < 2 ? "default" : "warning"
47-
group: parent.assignmentGroup
48-
label: "left"
49-
side: 0
50-
}
51-
CrossfaderAssignButton {
52-
activeStyle: "warning"
53-
group: parent.assignmentGroup
54-
label: "mid"
55-
side: 1
56-
}
57-
CrossfaderAssignButton {
58-
activeStyle: index < 2 ? "default" : "warning"
59-
group: parent.assignmentGroup
60-
label: "right"
61-
side: 2
62-
}
40+
group: root.groups[index]
41+
leftStyle: index < 2 ? "default" : "warning"
42+
rightStyle: index < 2 ? "warning" : "default"
6343
}
6444
}
6545
}

res/skins/LateNightQML/Mixer/CrossfaderAssignButton.qml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,27 @@ import "../LateNightTheme"
55
Item {
66
id: root
77

8-
property string activeStyle: "default"
98
required property string group
10-
required property string label
11-
required property int side
12-
readonly property string stateName: {
13-
if (Math.round(orientationControl.value) !== root.side) {
14-
return "off";
9+
property string leftStyle: "default"
10+
property string rightStyle: "default"
11+
readonly property int state: Math.max(0, Math.min(2, Math.round(orientationControl.value)))
12+
readonly property string stateLabel: ["left", "mid", "right"][state]
13+
readonly property string stateStyle: {
14+
if (state === 0) {
15+
return root.leftStyle;
16+
} else if (state === 2) {
17+
return root.rightStyle;
1518
}
16-
return root.activeStyle;
19+
return "warning";
1720
}
1821

1922
implicitHeight: 15
20-
implicitWidth: 11
23+
implicitWidth: 33
2124

2225
Image {
2326
anchors.fill: parent
2427
fillMode: Image.PreserveAspectFit
25-
source: LateNightTheme.lateNightAsset("buttons", "btn__xfader_deck_" + root.label + "_" + root.stateName + ".svg")
28+
source: LateNightTheme.lateNightAsset("buttons", "btn__xfader_deck_" + root.stateLabel + "_" + root.stateStyle + ".svg")
2629
}
2730
MouseArea {
2831
anchors.fill: parent

res/skins/LateNightQML/Mixer/EqKnobRow.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Item {
5252
id: statusDot
5353

5454
height: 9
55-
source: eqKillButton.value > 0 ? LateNightTheme.assetMixerEqKillDotActiveRed : LateNightTheme.assetMixerEqKillDotOff
56-
visible: !root.showKill && root.visible
55+
source: eqKillButton.value > 0 ? LateNightTheme.optionalMixerEqKillDotActiveRed : LateNightTheme.optionalMixerEqKillDotOff
56+
visible: LateNightTheme.isPaleMoon && !root.showKill && root.visible
5757
width: 9
5858
x: root.mirror ? eqKnob.x + 32 : eqKnob.x
5959
y: 27

res/skins/LateNightQML/Mixer/EqQuickColumn.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ Column {
4040
group: root.group
4141
mirror: root.alignRight
4242
showEqKillButtons: root.showEqKillButtons
43+
visible: root.showEqKnobs
4344
}
4445
}

res/skins/LateNightQML/Mixer/Mixer.qml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Item {
88
required property var groups
99
property bool show4decks: false
1010

11-
implicitHeight: decks.implicitHeight
11+
implicitHeight: Math.max(decks.implicitHeight, showMainHeadMixerControl.value > 0 ? mainHeadphonePanel.implicitHeight : 0)
1212
implicitWidth: decks.implicitWidth + (showMainHeadMixerControl.value > 0 ? 98 : 0)
1313

1414
Rectangle {
@@ -25,32 +25,37 @@ Item {
2525
id: decks
2626

2727
groups: root.groups
28+
height: root.implicitHeight
2829
show4decks: root.show4decks
2930
showEqKillButtons: showEqKillButtonsControl.value > 0
3031
showEqKnobs: showEqKnobsControl.value > 0
3132
showXfader: showXfaderControl.value > 0
3233
x: 0
3334
y: 0
3435
}
35-
Rectangle {
36+
Item {
3637
height: parent.height
3738
visible: showMainHeadMixerControl.value > 0
3839
width: 2
3940
x: decks.implicitWidth
4041

41-
gradient: Gradient {
42-
GradientStop {
43-
color: LateNightTheme.mixerPanelBorderDark
44-
position: 0
45-
}
46-
GradientStop {
47-
color: LateNightTheme.mixerPanelBorderLight
48-
position: 1
49-
}
42+
Rectangle {
43+
anchors.left: parent.left
44+
color: LateNightTheme.mixerMainSeparatorDarkColor
45+
height: parent.height
46+
width: 1
47+
}
48+
Rectangle {
49+
anchors.right: parent.right
50+
color: LateNightTheme.mixerMainSeparatorLightColor
51+
height: parent.height
52+
width: 1
5053
}
5154
}
5255
MainHeadphonePanel {
53-
height: decks.implicitHeight
56+
id: mainHeadphonePanel
57+
58+
height: root.implicitHeight
5459
show4decks: root.show4decks
5560
visible: showMainHeadMixerControl.value > 0
5661
width: 96

res/skins/LateNightQML/Mixer/MixerChannel2Deck.qml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ Item {
99
property bool mirror: false
1010
property bool showEqKillButtons: true
1111
property bool showEqKnobs: true
12+
property bool showXfader: true
1213

1314
implicitHeight: 203
14-
implicitWidth: root.showEqKillButtons ? 109 : 91
15+
implicitWidth: root.showEqKnobs ? (root.showEqKillButtons ? 109 : 91) : 42
1516

1617
Item {
1718
anchors.left: root.mirror ? parent.left : undefined
@@ -48,29 +49,13 @@ Item {
4849
x: root.mirror ? 42 : (root.showEqKillButtons ? 5 : 18)
4950
y: 156
5051
}
51-
Row {
52-
visible: root.showEqKnobs
53-
x: root.mirror ? 46 : 22
52+
CrossfaderAssignButton {
53+
group: root.group
54+
leftStyle: root.mirror ? "warning" : "default"
55+
rightStyle: root.mirror ? "default" : "warning"
56+
visible: root.showXfader
57+
x: root.showEqKnobs ? (root.mirror ? 46 : 22) : (root.mirror ? 18 : 57)
5458
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-
}
7459
}
7560
}
7661
}

res/skins/LateNightQML/Mixer/MixerChannel4Deck.qml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ Item {
1010
property string rightStyle: "default"
1111
property bool showEqKillButtons: true
1212
property bool showEqKnobs: true
13+
property bool showXfader: true
1314

14-
implicitHeight: 405
15-
implicitWidth: root.showEqKillButtons ? 62 : 44
15+
implicitHeight: root.showXfader ? 359 : 344
16+
implicitWidth: !root.showEqKnobs || root.showEqKillButtons ? 62 : 44
1617

1718
Item {
1819
anchors.right: parent.right
@@ -67,6 +68,7 @@ Item {
6768
}
6869
QuickEffectRow {
6970
group: root.group
71+
visible: root.showEqKnobs
7072
width: 58
7173
x: 0
7274
y: 154
@@ -102,28 +104,12 @@ Item {
102104
y: 237
103105
}
104106
CrossfaderAssignButton {
105-
activeStyle: root.leftStyle
106107
group: root.group
107-
label: "left"
108-
side: 0
108+
leftStyle: root.leftStyle
109+
rightStyle: root.rightStyle
110+
visible: root.showXfader
109111
x: 14
110112
y: 344
111113
}
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-
}
128114
}
129115
}

res/skins/LateNightQML/Mixer/MixerDecks.qml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,23 @@ Item {
1111
property bool showEqKnobs: true
1212
property bool showXfader: true
1313

14-
implicitHeight: show4decks ? 405 : 203
15-
implicitWidth: show4decks ? (showEqKillButtons ? 278 : 206) : (showEqKillButtons ? 278 : 242)
14+
implicitHeight: root.show4decks ? (root.showXfader ? 405 : 352) : (root.showXfader ? 203 : (root.showEqKnobs ? 182 : 164))
15+
implicitWidth: root.show4decks ? ((!root.showEqKnobs || root.showEqKillButtons) ? 278 : 206) : (root.showEqKnobs ? (root.showEqKillButtons ? 278 : 242) : (root.showXfader ? 163 : 151))
1616

1717
Item {
1818
anchors.horizontalCenter: parent.horizontalCenter
1919
height: parent.height
2020
visible: !root.show4decks
2121
width: 278
22+
y: root.showXfader ? 0 : Math.max(0, (parent.height - (root.showEqKnobs ? 174 : 156)) / 2)
2223

2324
MixerChannel2Deck {
2425
anchors.right: parent.horizontalCenter
2526
anchors.rightMargin: 25
2627
group: root.groups[0]
2728
showEqKillButtons: root.showEqKillButtons
2829
showEqKnobs: root.showEqKnobs
30+
showXfader: root.showXfader
2931
}
3032
MixerChannel2Deck {
3133
anchors.left: parent.horizontalCenter
@@ -34,6 +36,7 @@ Item {
3436
mirror: true
3537
showEqKillButtons: root.showEqKillButtons
3638
showEqKnobs: root.showEqKnobs
39+
showXfader: root.showXfader
3740
}
3841
PflButton {
3942
group: root.groups[0]
@@ -121,11 +124,11 @@ Item {
121124
y: 55
122125
}
123126
Crossfader {
127+
anchors.horizontalCenter: parent.horizontalCenter
124128
compact: !root.showEqKnobs
125129
groups: [root.groups[0], root.groups[1]]
126130
showAssignments: false
127131
visible: root.showXfader
128-
x: root.showEqKnobs ? 82 : 90
129132
y: 155
130133
}
131134
}
@@ -143,27 +146,31 @@ Item {
143146
rightStyle: "warning"
144147
showEqKillButtons: root.showEqKillButtons
145148
showEqKnobs: root.showEqKnobs
149+
showXfader: root.showXfader
146150
}
147151
MixerChannel4Deck {
148152
group: root.groups[0]
149153
leftStyle: "default"
150154
rightStyle: "warning"
151155
showEqKillButtons: root.showEqKillButtons
152156
showEqKnobs: root.showEqKnobs
157+
showXfader: root.showXfader
153158
}
154159
MixerChannel4Deck {
155160
group: root.groups[1]
156161
leftStyle: "warning"
157162
rightStyle: "default"
158163
showEqKillButtons: root.showEqKillButtons
159164
showEqKnobs: root.showEqKnobs
165+
showXfader: root.showXfader
160166
}
161167
MixerChannel4Deck {
162168
group: root.groups[3]
163169
leftStyle: "warning"
164170
rightStyle: "default"
165171
showEqKillButtons: root.showEqKillButtons
166172
showEqKnobs: root.showEqKnobs
173+
showXfader: root.showXfader
167174
}
168175
}
169176
Crossfader {

0 commit comments

Comments
 (0)