Skip to content

Commit f8bd03f

Browse files
authored
Merge branch 'mixxxdj:main' into gain-effect
2 parents 18ab0b1 + 50c2790 commit f8bd03f

38 files changed

Lines changed: 1962 additions & 1858 deletions

res/qml/Button.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ AbstractButton {
2222

2323
anchors.fill: parent
2424
color: '#2B2B2B'
25+
radius: 2
2526
}
2627
DropShadow {
2728
id: effect1

res/qml/Deck.qml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,12 @@ Item {
9999
"type": "row",
100100
"items": [
101101
{
102-
"type": "hotcueAndStem"
102+
"type": "hotcueAndStem",
103+
"minWidth": 520
103104
},
104105
{
105-
"type": "beatjump"
106+
"type": "beatjump",
107+
"minWidth": 650
106108
},
107109
{
108110
"type": "loop"
@@ -117,6 +119,7 @@ Item {
117119
},
118120
{
119121
"type": "column",
122+
"minWidth": 800,
120123
"items": [
121124
{
122125
"type": "spinny"
@@ -127,7 +130,8 @@ Item {
127130
]
128131
},
129132
{
130-
"type": "tempo"
133+
"type": "tempo",
134+
"minWidth": 270
131135
}
132136
]
133137
}
@@ -188,6 +192,7 @@ Item {
188192
ListModel {
189193
id: itemModel
190194

195+
dynamicRoles: true
191196
}
192197
ListModel {
193198
id: minimizedItemModel
@@ -359,14 +364,14 @@ Item {
359364
roleValue: "spinny"
360365

361366
LayoutItem {
362-
Layout.alignment: Qt.AlignCenter
367+
Layout.alignment: Qt.AlignTop
363368
editLabel.color: Theme.midGray
364369
editLabel.font.pixelSize: 14
365370
editLabel.text: "Spinny"
366371
editOverlay.color: "#BDBDBD"
367372
editOverlay.radius: height
368-
height: 130
369-
width: 130
373+
height: 140
374+
width: 140
370375

371376
DeckComponent.Spinny {
372377
anchors.fill: parent
@@ -662,8 +667,6 @@ Item {
662667
property var beginDrag: null
663668
property var disposition: GridLayout.TopToBottom
664669
property alias editOverlay: overlay
665-
required property int index
666-
required property var items
667670
property var move: null
668671
property bool selected: false
669672

@@ -696,6 +699,7 @@ Item {
696699
Drag.active: mouseArea.drag.active
697700
Drag.hotSpot: Qt.point(width / 2, height / 2)
698701
columns: disposition == GridLayout.TopToBottom ? 1 : items.count
702+
visible: typeof minWidth !== 'number' || root.width <= 0 || minWidth < root.width
699703

700704
Behavior on x {
701705
SpringAnimation {
@@ -781,6 +785,7 @@ Item {
781785

782786
Drag.active: mouseArea.drag.active
783787
Drag.hotSpot: Qt.point(width / 2, height / 2)
788+
visible: typeof minWidth !== 'number' || root.width <= 0 || minWidth < root.width
784789

785790
Behavior on x {
786791
SpringAnimation {

res/qml/Deck/FXAssign.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Item {
2626
when: holder.index != 0
2727

2828
AnchorChanges {
29-
anchors.bottom: parent.bottom
29+
// anchors.bottom: parent.bottom
3030
anchors.top: undefined
3131
target: root
3232
}

res/qml/Deck/InfoBar.qml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Rectangle {
1212
id: root
1313

1414
property list<string> availableData: ["none", "title", "year", "remaining", "artist", "rating"]
15-
readonly property var currentTrack: deckPlayer.currentTrack
15+
readonly property var currentTrack: deckPlayer?.currentTrack
1616
property var deckPlayer: Mixxx.PlayerManager.getPlayer(group)
1717
property bool editMode: false
1818
required property string group
@@ -27,11 +27,11 @@ Rectangle {
2727

2828
GradientStop {
2929
color: {
30-
const trackColor = root.currentTrack.color;
30+
const trackColor = root.currentTrack?.color;
3131
if (!trackColor.valid)
3232
return Theme.deckInfoBarBackgroundColor;
3333

34-
return Qt.darker(root.currentTrack.color, 2);
34+
return Qt.darker(root.currentTrack?.color, 2);
3535
}
3636
position: 0
3737
}
@@ -48,7 +48,7 @@ Rectangle {
4848
anchors.left: parent.left
4949
anchors.top: parent.top
5050
asynchronous: true
51-
source: root.currentTrack.coverArtUrl
51+
source: root.currentTrack?.coverArtUrl
5252
visible: false
5353
width: height
5454
}
@@ -58,15 +58,15 @@ Rectangle {
5858
anchors.fill: coverArt
5959
color: Theme.deckEmptyCoverArt
6060
radius: 4
61-
visible: !root.deckPlayer.isLoaded && !root.minimized
61+
visible: !root.deckPlayer?.isLoaded && !root.minimized
6262
}
6363
OpacityMask {
6464
id: coverArtMask
6565

6666
anchors.fill: coverArt
6767
maskSource: coverArtCircle
6868
source: coverArt
69-
visible: root.deckPlayer.isLoaded && !root.minimized
69+
visible: root.deckPlayer?.isLoaded && !root.minimized
7070

7171
Skin.FadeBehavior on visible {
7272
fadeTarget: coverArtMask
@@ -82,29 +82,31 @@ Rectangle {
8282

8383
Cell {
8484
item.font.bold: false
85-
item.font.weight: root.deckPlayer.isLoaded ? Font.DemiBold : Font.Thin
86-
item.text: root.deckPlayer.isLoaded ? root.currentTrack.title : "No track loaded"
85+
item.font.weight: root.deckPlayer?.isLoaded ? Font.DemiBold : Font.Thin
86+
item.text: root.deckPlayer?.isLoaded ? root.currentTrack?.title : "No track loaded"
8787
item.visible: true
8888
}
8989
}
9090
DelegateChoice {
9191
roleValue: "artist"
9292

9393
Cell {
94-
item.text: root.currentTrack.artist
94+
item.text: root.currentTrack?.artist
9595
}
9696
}
9797
DelegateChoice {
9898
roleValue: "year"
9999

100100
Cell {
101-
item.text: root.currentTrack.year
101+
visible: root.width > 500 && root.currentTrack?.year
102+
item.text: root.currentTrack?.year
102103
}
103104
}
104105
DelegateChoice {
105106
roleValue: "remaining"
106107

107108
Cell {
109+
visible: root.width > 450
108110
readonly property real remaining: durationControl.value * (1 - playPositionControl.value)
109111

110112
item.text: `-${parseInt(remaining / 60).toString().padStart(2, '0')}:${parseInt(remaining % 60).toString().padStart(2, '0')}.${(remaining % 1).toFixed(1)}`
@@ -131,11 +133,12 @@ Rectangle {
131133

132134
required property int index
133135
property real ratio: ((rateRatioControl.value - 1) * 100).toPrecision(2)
134-
property bool showSeparator: index != parent.model.count - 1 && root.deckPlayer.isLoaded
136+
property bool showSeparator: index != parent.model.count - 1 && root.deckPlayer?.isLoaded
135137

136138
Layout.fillHeight: true
137139
Layout.fillWidth: index == 0
138140
Layout.preferredWidth: index == 0 ? 0 : rightColumnWidth
141+
visible: root.width > 400
139142

140143
Mixxx.ControlProxy {
141144
id: rateRatioControl
@@ -148,7 +151,7 @@ Rectangle {
148151

149152
anchors.centerIn: parent
150153
spacing: 0
151-
visible: root.deckPlayer.isLoaded
154+
visible: root.deckPlayer?.isLoaded
152155

153156
Repeater {
154157
model: 5
@@ -220,12 +223,14 @@ Rectangle {
220223
hoverEnabled: true
221224

222225
onClicked: event => {
226+
if (!root.currentTrack) {
227+
return;
228+
}
223229
let selectedStars = Math.ceil((mouseX - stars.x) / 16);
224230
if (event.button === Qt.RightButton) {
225231
root.currentTrack.stars = 0;
226232
} else if (selectedStars >= 0 && selectedStars <= 5) {
227233
root.currentTrack.stars = selectedStars;
228-
console.warn(root.currentTrack.stars);
229234
}
230235
}
231236
}
@@ -341,7 +346,7 @@ Rectangle {
341346
required property int index
342347
readonly property bool isTop: !!parent.isTop
343348
property alias item: data
344-
property bool showSeparator: index != parent.model.count - 1 && root.deckPlayer.isLoaded
349+
property bool showSeparator: index != parent.model.count - 1 && root.deckPlayer?.isLoaded
345350

346351
Layout.fillHeight: true
347352
Layout.fillWidth: index == 0
@@ -356,7 +361,7 @@ Rectangle {
356361
font.bold: isTop
357362
font.pixelSize: isTop ? 18 : Theme.textFontPixelSize
358363
horizontalAlignment: index == 0 ? Text.AlignLeft : Text.AlignHCenter
359-
visible: root.deckPlayer.isLoaded
364+
visible: root.deckPlayer?.isLoaded
360365

361366
Skin.FadeBehavior on visible {
362367
fadeTarget: data

res/qml/Deck/Spinny.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Item {
2020
id: spinner
2121

2222
color: '#BDBDBD'
23-
height: 130
23+
height: 140
2424
radius: width / 2
25-
width: 130
25+
width: 140
2626

2727
transform: Rotation {
2828
angle: 45

res/qml/Deck/Toolbar.qml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ Item {
3838
strokeColor: 'transparent'
3939

4040
PathLine {
41-
x: 18
41+
x: 20
4242
y: 4
4343
}
4444
PathLine {
45-
x: 18
45+
x: 20
4646
y: 18
4747
}
4848
PathLine {
@@ -59,6 +59,7 @@ Item {
5959
anchors.rightMargin: 5
6060
implicitHeight: 22
6161
text: "Beatgrid"
62+
visible: root.width > 165
6263
}
6364
Skin.Button {
6465
id: keylockButton
@@ -67,6 +68,7 @@ Item {
6768
anchors.rightMargin: 5
6869
implicitHeight: 22
6970
text: "Keylock"
71+
visible: root.width > 105
7072
}
7173
Skin.ControlButton {
7274
id: ejectButton

0 commit comments

Comments
 (0)