Skip to content

Commit 815cfb2

Browse files
committed
fix(LateNightQML): correct deck display and waveform markers
1 parent fb35f76 commit 815cfb2

4 files changed

Lines changed: 10 additions & 12 deletions

File tree

res/skins/LateNightQML/Deck/LateNightBpmTapEditor.qml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Item {
1212
property string mode: "listen"
1313
property real originalEditValue: 0
1414
property bool editingBpm: true
15-
property real tapModeEnteredAt: 0
1615

1716
readonly property bool listenHovered: listenArea.containsMouse
1817
readonly property int hoverLeaveTimeout: 2000
@@ -33,7 +32,7 @@ Item {
3332
} else if (newMode === "edit") {
3433
startEditMode();
3534
} else if (newMode === "tap") {
36-
root.tapModeEnteredAt = Date.now();
35+
tapClickGuardTimer.restart();
3736
hideTimer.stop();
3837
} else if (newMode === "listen") {
3938
editInput.text = "";
@@ -42,7 +41,7 @@ Item {
4241
}
4342

4443
function handleTapClick(mouse) {
45-
if (Date.now() - root.tapModeEnteredAt < root.tapModeClickGuardTimeout) {
44+
if (tapClickGuardTimer.running) {
4645
return;
4746
}
4847
root.tapControl(mouse.button === Qt.RightButton ? bpmTapProxy : tempoTapProxy);
@@ -154,6 +153,12 @@ Item {
154153
onTriggered: root.switchMode("listen")
155154
}
156155

156+
Timer {
157+
id: tapClickGuardTimer
158+
interval: root.tapModeClickGuardTimeout
159+
repeat: false
160+
}
161+
157162
MouseArea {
158163
id: listenArea
159164
anchors.fill: parent

res/skins/LateNightQML/Deck/RatePlaceholder.qml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ Item {
4848
key: "bpm"
4949
}
5050

51-
Mixxx.ControlProxy {
52-
id: visualBpmProxy
53-
group: root.group
54-
key: "visual_bpm"
55-
}
56-
5751
Mixxx.ControlProxy {
5852
id: rateRatioProxy
5953
group: root.group
@@ -142,7 +136,7 @@ Item {
142136
Text {
143137
width: parent.width
144138
height: 24
145-
text: visualBpmProxy.value.toFixed(2)
139+
text: bpmProxy.value.toFixed(2)
146140
font.family: "Open Sans"
147141
font.pixelSize: 20
148142
font.bold: true

src/qml/qmllibraryproxy.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22
#include <QObject>
3-
#include <QPoint>
43
#include <QQmlEngine>
54
#include <QString>
65
#include <Qt>

src/qml/qmlwaveformrenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ QmlWaveformRendererFactory::Renderer QmlWaveformRendererMark::create(
440440
pMark->align(),
441441
pMark->text(),
442442
pixmap,
443-
icon,
444443
endPixmap,
444+
icon,
445445
endIcon,
446446
pMark->color(),
447447
pMark->enabledOpacity(),

0 commit comments

Comments
 (0)