From 0738e33d5876f3928454ce626ba595cf915faaa9 Mon Sep 17 00:00:00 2001 From: Eriq Taing Date: Wed, 10 Jun 2026 19:15:00 -0400 Subject: [PATCH] [AI] Added media control buttons to player control --- osd/PlayerControl.qml | 49 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/osd/PlayerControl.qml b/osd/PlayerControl.qml index d26a7ad..d15013f 100644 --- a/osd/PlayerControl.qml +++ b/osd/PlayerControl.qml @@ -188,8 +188,53 @@ Item { elide: Text.ElideRight text: playerController.player?.trackArtist } - Item { // spacing - Layout.fillHeight: true + RowLayout { + Layout.fillWidth: true + Layout.preferredHeight: 32 + spacing: 8 + + RippleButton { + implicitWidth: 32 + implicitHeight: 32 + onClicked: playerController.player?.previous() + contentItem: MaterialSymbol { + text: "skip_previous" + iconSize: 24 + anchors.centerIn: parent + color: blendedColors.colOnLayer1 + } + } + + RippleButton { + id: playPauseButton + implicitWidth: 32 + implicitHeight: 32 + onClicked: { + if (playerController.player?.playbackState == MprisPlaybackState.Playing) { + playerController.player?.pause() + } else { + playerController.player?.play() + } + } + contentItem: MaterialSymbol { + text: playerController.player?.playbackState == MprisPlaybackState.Playing ? "pause" : "play_arrow" + iconSize: 24 + anchors.centerIn: parent + color: blendedColors.colOnLayer1 + } + } + + RippleButton { + implicitWidth: 32 + implicitHeight: 32 + onClicked: playerController.player?.next() + contentItem: MaterialSymbol { + text: "skip_next" + iconSize: 24 + anchors.centerIn: parent + color: blendedColors.colOnLayer1 + } + } } } }