From 27e5bfb21627c73b53623c5ccbf93841a221bfb2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 7 Nov 2026 12:23:51 +0100 Subject: island: shuffle and repeat as two Sonix buttons The one mode button cycled all five SonixLink modes and showed repeat-off as its first state, so shuffle looked missing. Shuffle is now a toggle on the left and repeat a cycle on the right. SonixLink has no shuffle with repeat one, so with shuffle on repeat goes off and all only. Co-Authored-By: Claude Opus 5.5 --- desktop/island/README.md | 2 +- desktop/island/SonixPanel.qml | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'desktop/island') diff --git a/desktop/island/README.md b/desktop/island/README.md index 7adf9ad..1b1a3f2 100644 --- a/desktop/island/README.md +++ b/desktop/island/README.md @@ -54,7 +54,7 @@ page now (`desktop/modules/perf/`). - **Sonix player icon** shows while a HiBy R1 running Sonix Player is on the network (its SonixLink beacon). A dot under it while it plays. Click opens its panel: cover, title, a heart for the track's favourite, - quality, seek, transport, mode, volume (sent once it settles), battery. + quality, seek, transport, shuffle and repeat, volume (sent once it settles), battery. See `desktop/modules/sonix/README.md`. - **Headphones icon** shows while Sony headphones are connected (a BlueZ name starting `WH-`, `WF-` or `LinkBuds`). Click opens the headphones diff --git a/desktop/island/SonixPanel.qml b/desktop/island/SonixPanel.qml index 609afda..09e7b1c 100644 --- a/desktop/island/SonixPanel.qml +++ b/desktop/island/SonixPanel.qml @@ -280,10 +280,16 @@ Column { TransportButton { glyph: "\uF051"; onClicked: Sonix.command({ do: "next" }, null, panel.report) } } + TransportButton { + anchors { left: parent.left; verticalCenter: parent.verticalCenter } + glyph: panel.glyph(S.shuffleGlyph(panel.p.mode)) + onClicked: Sonix.command({ do: "mode", value: S.toggleShuffle(panel.p.mode) }, null, panel.report) + } + TransportButton { anchors { right: parent.right; verticalCenter: parent.verticalCenter } - glyph: panel.glyph(S.modeGlyph(panel.p.mode)) - onClicked: Sonix.command({ do: "mode", value: S.nextMode(panel.p.mode) }, null, panel.report) + glyph: panel.glyph(S.repeatGlyph(panel.p.mode)) + onClicked: Sonix.command({ do: "mode", value: S.nextRepeat(panel.p.mode) }, null, panel.report) } } -- cgit v1.2.3