Skip to content

Commit 5047d08

Browse files
committed
fix(LateNightQML): correct BPM editor layout and track fallback
1 parent 238ab3f commit 5047d08

2 files changed

Lines changed: 34 additions & 27 deletions

File tree

res/skins/LateNightQML/Deck/LateNightBpmTapEditor.qml

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -263,30 +263,37 @@ Item {
263263
anchors.fill: parent
264264
visible: root.mode === "edit"
265265
color: LateNightTheme.bpmTapEditorBackgroundColor
266-
border.width: 1
267-
border.color: LateNightTheme.bpmTapEditorEditBorderColor
268-
radius: 2
269-
270-
TextInput {
271-
id: editInput
272-
x: 1
273-
y: 1
274-
width: parent.width - 2
275-
height: parent.height - 17
276-
color: LateNightTheme.textColor
277-
selectedTextColor: LateNightTheme.deckActiveButtonTextColor
278-
selectionColor: LateNightTheme.textColor
279-
font.family: "Open Sans"
280-
font.pixelSize: 14
281-
font.weight: Font.Medium
282-
horizontalAlignment: TextInput.AlignHCenter
283-
verticalAlignment: TextInput.AlignVCenter
284-
inputMethodHints: Qt.ImhFormattedNumbersOnly
285-
selectByMouse: true
286-
287-
Keys.onReturnPressed: root.applyEditValueAndQuit()
288-
Keys.onEnterPressed: root.applyEditValueAndQuit()
289-
Keys.onEscapePressed: root.switchMode("listen")
266+
radius: 1
267+
268+
Rectangle {
269+
x: 0
270+
y: 0
271+
width: parent.width
272+
height: parent.height - 16
273+
color: LateNightTheme.bpmTapEditorBackgroundColor
274+
border.width: 1
275+
border.color: LateNightTheme.bpmTapEditorEditBorderColor
276+
radius: 1
277+
278+
TextInput {
279+
id: editInput
280+
anchors.fill: parent
281+
anchors.margins: 1
282+
color: LateNightTheme.textColor
283+
selectedTextColor: LateNightTheme.deckActiveButtonTextColor
284+
selectionColor: LateNightTheme.textColor
285+
font.family: "Open Sans"
286+
font.pixelSize: 14
287+
font.weight: Font.Medium
288+
horizontalAlignment: TextInput.AlignHCenter
289+
verticalAlignment: TextInput.AlignVCenter
290+
inputMethodHints: Qt.ImhFormattedNumbersOnly
291+
selectByMouse: true
292+
293+
Keys.onReturnPressed: root.applyEditValueAndQuit()
294+
Keys.onEnterPressed: root.applyEditValueAndQuit()
295+
Keys.onEscapePressed: root.switchMode("listen")
296+
}
290297
}
291298

292299
Rectangle {
@@ -297,7 +304,7 @@ Item {
297304
color: LateNightTheme.bpmTapEditorButtonColor
298305

299306
Image {
300-
anchors.centerIn: parent
307+
anchors.fill: parent
301308
source: decreaseArea.pressed ? LateNightTheme.assetDeckBpmSpinboxMinusPressedButton : LateNightTheme.assetDeckBpmSpinboxMinusButton
302309
fillMode: Image.PreserveAspectFit
303310
}
@@ -317,7 +324,7 @@ Item {
317324
color: LateNightTheme.bpmTapEditorButtonColor
318325

319326
Image {
320-
anchors.centerIn: parent
327+
anchors.fill: parent
321328
source: increaseArea.pressed ? LateNightTheme.assetDeckBpmSpinboxPlusPressedButton : LateNightTheme.assetDeckBpmSpinboxPlusButton
322329
fillMode: Image.PreserveAspectFit
323330
}

res/skins/LateNightQML/Deck/TitleTimeRows.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Item {
1212
required property string group
1313

1414
readonly property Mixxx.Player deckPlayer: Mixxx.PlayerManager.getPlayer(root.group)
15-
readonly property Mixxx.Track currentTrack: root.deckPlayer?.currentTrack
15+
readonly property Mixxx.Track currentTrack: root.deckPlayer?.currentTrack ?? null
1616
readonly property bool isLoaded: deckPlayer?.isLoaded ?? false
1717
readonly property bool useSecondaryDeckText: root.group === "[Channel3]" || root.group === "[Channel4]"
1818
readonly property color loadedDeckTextColor: useSecondaryDeckText ? LateNightTheme.secondaryDeckTextColor : LateNightTheme.primaryDeckTextColor

0 commit comments

Comments
 (0)