diff --git a/Modules/Settings/Tabs/DisplayTab.qml b/Modules/Settings/Tabs/DisplayTab.qml index f881c8c9..d6ae8420 100644 --- a/Modules/Settings/Tabs/DisplayTab.qml +++ b/Modules/Settings/Tabs/DisplayTab.qml @@ -167,11 +167,11 @@ ColumnLayout { to: 1 value: brightnessMonitor ? brightnessMonitor.brightness : 0.5 stepSize: 0.01 - onMoved: (value) => { - if (brightnessMonitor.method === "internal") { - brightnessMonitor.setBrightness(value) - } - } + onMoved: value => { + if (brightnessMonitor.method === "internal") { + brightnessMonitor.setBrightness(value) + } + } onPressedChanged: (pressed, value) => brightnessMonitor.setBrightness(value) Layout.fillWidth: true } diff --git a/Services/IPCService.qml b/Services/IPCService.qml index 6b81b475..711d44dd 100644 --- a/Services/IPCService.qml +++ b/Services/IPCService.qml @@ -168,43 +168,43 @@ Item { } IpcHandler { - target: "media" - function playPause() { - MediaService.playPause() - } + target: "media" + function playPause() { + MediaService.playPause() + } - function play() { - MediaService.play() - } + function play() { + MediaService.play() + } - function pause() { - MediaService.pause() - } - - function next() { - MediaService.next() - } + function pause() { + MediaService.pause() + } - function previous() { - MediaService.previous() - } + function next() { + MediaService.next() + } - function seekRelative(offset: string) { - var offsetVal = parseFloat(position) - if (Number.isNaN(offsetVal)) { - Logger.warn("Media", "Argument to ipc call 'media seekRelative' must be a number") - return - } - MediaService.seekRelative(offsetVal) - } + function previous() { + MediaService.previous() + } - function seekByRatio(position: string) { - var positionVal = parseFloat(position) - if (Number.isNaN(positionVal)) { - Logger.warn("Media", "Argument to ipc call 'media seekByRatio' must be a number") - return - } - MediaService.seekByRatio(positionVal) + function seekRelative(offset: string) { + var offsetVal = parseFloat(position) + if (Number.isNaN(offsetVal)) { + Logger.warn("Media", "Argument to ipc call 'media seekRelative' must be a number") + return } + MediaService.seekRelative(offsetVal) + } + + function seekByRatio(position: string) { + var positionVal = parseFloat(position) + if (Number.isNaN(positionVal)) { + Logger.warn("Media", "Argument to ipc call 'media seekByRatio' must be a number") + return + } + MediaService.seekByRatio(positionVal) + } } } diff --git a/Services/MediaService.qml b/Services/MediaService.qml index b2ff5308..4a6e0b68 100644 --- a/Services/MediaService.qml +++ b/Services/MediaService.qml @@ -153,9 +153,9 @@ Singleton { function seekRelative(offset) { if (currentPlayer && currentPlayer.canSeek) { - var newPosition = currentPlayer.position + offset; - currentPlayer.position = newPosition; - currentPosition = newPosition; + var newPosition = currentPlayer.position + offset + currentPlayer.position = newPosition + currentPosition = newPosition } }