@@ -265,6 +265,72 @@ ColumnLayout {
265265 Layout .fillWidth : true
266266 }
267267
268+ // Widget Color
269+ NColorChoice {
270+ label: pluginApi? .tr (" settings.colours" ) || " Colours"
271+ currentKey: root .editCatColor
272+ onSelected : key => { root .editCatColor = key; }
273+ }
274+
275+ // Cat Size Section
276+ NValueSlider {
277+ Layout .fillWidth : true
278+ label: pluginApi? .tr (" settings.cat-size" ) || " Cat Size"
279+ value: root .editCatSize
280+ from: 0.5
281+ to: 1.5
282+ stepSize: 0.01
283+ defaultValue: 1.0
284+ showReset: true
285+ text: Math .round (root .editCatSize * 100 ) + " %"
286+ onMoved : value => root .editCatSize = value
287+ }
288+
289+ // Vertical Position Section
290+ NValueSlider {
291+ Layout .fillWidth : true
292+ label: pluginApi? .tr (" settings.vertical-position" ) || " Vertical Position"
293+ value: root .editCatOffsetY
294+ from: - 0.39
295+ to: 0.61
296+ stepSize: 0.01
297+ defaultValue: 0.11
298+ showReset: true
299+ text: { let v = Math .round (- (root .editCatOffsetY - 0.11 ) * 100 ) / 100 ; return (v > 0 ? " +" : " " ) + v .toFixed (2 ) }
300+ onMoved : value => root .editCatOffsetY = value
301+ }
302+
303+ // Rave Mode
304+ NToggle {
305+ label: pluginApi? .tr (" settings.rave-mode" ) || " Rave Mode"
306+ description: pluginApi? .tr (" settings.rave-mode-desc" ) || " Change colors to the beat when music is playing"
307+ checked: root .editRaveMode
308+ onToggled : checked => root .editRaveMode = checked
309+ defaultValue: pluginApi? .manifest ? .metadata ? .defaultSettings ? .raveMode ?? false
310+ }
311+
312+ // Tappy Mode
313+ NToggle {
314+ label: pluginApi? .tr (" settings.tappy-mode" ) || " Tappy Mode"
315+ description: pluginApi? .tr (" settings.tappy-mode-desc" ) || " Make the cat tap along to the beat when music is playing"
316+ checked: root .editTappyMode
317+ onToggled : checked => root .editTappyMode = checked
318+ defaultValue: pluginApi? .manifest ? .metadata ? .defaultSettings ? .tappyMode ?? false
319+ }
320+
321+ // MPRIS Filtering
322+ NToggle {
323+ label: pluginApi? .tr (" settings.mpris-filter" ) || " MPRIS Filtering"
324+ description: pluginApi? .tr (" settings.mpris-filter-desc" ) || " Only react to audio when a non-blacklisted media player is playing (uses NoctalisShell audio blacklist)"
325+ checked: root .editUseMprisFilter
326+ onToggled : checked => root .editUseMprisFilter = checked
327+ defaultValue: pluginApi? .manifest ? .metadata ? .defaultSettings ? .useMprisFilter ?? false
328+ }
329+
330+ NDivider {
331+ Layout .fillWidth : true
332+ }
333+
268334 // Input Devices Section
269335 Text {
270336 text: pluginApi? .tr (" settings.input-devices" ) || " Input Devices"
@@ -371,76 +437,6 @@ ColumnLayout {
371437 }
372438 }
373439
374- NDivider {
375- Layout .fillWidth : true
376- }
377-
378- // Widget Color
379- NColorChoice {
380- label: pluginApi? .tr (" settings.colours" ) || " Colours"
381- currentKey: root .editCatColor
382- onSelected : key => { root .editCatColor = key; }
383- }
384-
385- // Rave Mode
386- NToggle {
387- label: pluginApi? .tr (" settings.rave-mode" ) || " Rave Mode"
388- description: pluginApi? .tr (" settings.rave-mode-desc" ) || " Change colors to the beat when music is playing"
389- checked: root .editRaveMode
390- onToggled : checked => root .editRaveMode = checked
391- defaultValue: pluginApi? .manifest ? .metadata ? .defaultSettings ? .raveMode ?? false
392- }
393-
394- // Tappy Mode
395- NToggle {
396- label: pluginApi? .tr (" settings.tappy-mode" ) || " Tappy Mode"
397- description: pluginApi? .tr (" settings.tappy-mode-desc" ) || " Make the cat tap along to the beat when music is playing"
398- checked: root .editTappyMode
399- onToggled : checked => root .editTappyMode = checked
400- defaultValue: pluginApi? .manifest ? .metadata ? .defaultSettings ? .tappyMode ?? false
401- }
402-
403- // MPRIS Filtering
404- NToggle {
405- label: pluginApi? .tr (" settings.mpris-filter" ) || " MPRIS Filtering"
406- description: pluginApi? .tr (" settings.mpris-filter-desc" ) || " Only react to audio when a non-blacklisted media player is playing (uses NoctalisShell audio blacklist)"
407- checked: root .editUseMprisFilter
408- onToggled : checked => root .editUseMprisFilter = checked
409- defaultValue: pluginApi? .manifest ? .metadata ? .defaultSettings ? .useMprisFilter ?? false
410- }
411-
412- NDivider {
413- Layout .fillWidth : true
414- }
415-
416- // Cat Size Section
417- NValueSlider {
418- Layout .fillWidth : true
419- label: pluginApi? .tr (" settings.cat-size" ) || " Cat Size"
420- value: root .editCatSize
421- from: 0.5
422- to: 1.5
423- stepSize: 0.01
424- defaultValue: 1.0
425- showReset: true
426- text: Math .round (root .editCatSize * 100 ) + " %"
427- onMoved : value => root .editCatSize = value
428- }
429-
430- // Vertical Position Section
431- NValueSlider {
432- Layout .fillWidth : true
433- label: pluginApi? .tr (" settings.vertical-position" ) || " Vertical Position"
434- value: root .editCatOffsetY
435- from: - 0.39
436- to: 0.61
437- stepSize: 0.01
438- defaultValue: 0.11
439- showReset: true
440- text: { let v = Math .round (- (root .editCatOffsetY - 0.11 ) * 100 ) / 100 ; return (v > 0 ? " +" : " " ) + v .toFixed (2 ) }
441- onMoved : value => root .editCatOffsetY = value
442- }
443-
444440 function saveSettings () {
445441 if (! pluginApi) {
446442 Logger .e (" Slow Bongo" , " Cannot save settings: pluginApi is null" )
0 commit comments