@@ -11,13 +11,22 @@ Rectangle {
11
11
12
12
required property string group
13
13
14
- color: ' #626262'
14
+ property color buttonColor: trackLoadedControl .value > 0 ? Theme .buttonActiveColor : Theme .buttonDisableColor
15
+
16
+ color: Theme .deckBeatjumpBackgroundColor
15
17
16
18
Label {
17
19
anchors .top : parent .top
18
20
anchors .horizontalCenter : parent .horizontalCenter
19
21
text: " Beatjump"
20
- color: ' #3F3F3F'
22
+ color: Theme .deckBeatjumpLabelColor
23
+ }
24
+
25
+ Mixxx .ControlProxy {
26
+ id: trackLoadedControl
27
+
28
+ group: root .group
29
+ key: " track_loaded"
21
30
}
22
31
23
32
Skin .ControlButton {
@@ -44,7 +53,8 @@ Rectangle {
44
53
layer .enabled : true
45
54
layer .samples : 4
46
55
ShapePath {
47
- fillColor: ' #D9D9D9'
56
+ fillColor: root .buttonColor
57
+ strokeColor: ' transparent'
48
58
startX: 0 ; startY: 1
49
59
PathLine { x: 1 ; y: 1 }
50
60
PathLine { x: 1 ; y: 7 }
@@ -89,7 +99,8 @@ Rectangle {
89
99
layer .enabled : true
90
100
layer .samples : 4
91
101
ShapePath {
92
- fillColor: ' #D9D9D9'
102
+ fillColor: root .buttonColor
103
+ strokeColor: ' transparent'
93
104
startX: 0 ; startY: 1
94
105
PathLine { x: 10 ; y: 7 }
95
106
PathLine { x: 10 ; y: 1 }
@@ -132,7 +143,7 @@ Rectangle {
132
143
layer .enabled : true
133
144
layer .samples : 4
134
145
ShapePath {
135
- fillColor: ' #626262 '
146
+ fillColor: root . buttonColor
136
147
strokeColor: ' transparent'
137
148
startX: 0 ; startY: 5
138
149
PathLine { x: 12 ; y: 0 }
@@ -141,7 +152,6 @@ Rectangle {
141
152
}
142
153
}
143
154
}
144
- activeColor: Theme .deckActiveColor
145
155
}
146
156
Item {
147
157
anchors {
@@ -187,7 +197,29 @@ Rectangle {
187
197
TextInput {
188
198
anchors .centerIn : backgroundImage
189
199
text: beatjumpSize .value < 1 ? ` 1/${ 1 / beatjumpSize .value } ` : beatjumpSize .value
190
- color: " #626262"
200
+ color: root .buttonColor
201
+
202
+ function update () {
203
+ this .text = Qt .bindind (function () { return beatjumpSize .value < 1 ? ` 1/${ 1 / beatjumpSize .value } ` : beatjumpSize .value ; })
204
+ }
205
+
206
+ onAccepted: {
207
+ this .focus = false
208
+ let [num, denum] = this .text .split (" /" )
209
+ if (denum !== undefined ) {
210
+ denum = parseInt (denum)
211
+ if (Number .isNaN (denum)) {
212
+ return update ()
213
+ }
214
+ } else {
215
+ denum = 1
216
+ }
217
+ num = parseInt (num)
218
+ if (Number .isNaN (num)) {
219
+ return update ()
220
+ }
221
+ beatjumpSize .value = num / denum
222
+ }
191
223
}
192
224
}
193
225
@@ -215,7 +247,7 @@ Rectangle {
215
247
layer .enabled : true
216
248
layer .samples : 4
217
249
ShapePath {
218
- fillColor: ' #626262 '
250
+ fillColor: root . buttonColor
219
251
strokeColor: ' transparent'
220
252
startX: 0 ; startY: 0
221
253
fillRule: ShapePath .WindingFill
@@ -226,6 +258,5 @@ Rectangle {
226
258
}
227
259
}
228
260
}
229
- activeColor: Theme .deckActiveColor
230
261
}
231
262
}
0 commit comments