diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-07 11:57:34 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-07 11:57:34 +0100 |
| commit | b074d4927f699dc662a56c701d31787b711e331a (patch) | |
| tree | 4a7592ad6595993ec7fee8d0a57733256b3ad96c /desktop/island/StatusPill.qml | |
| parent | f75ebb4b5f366274cfa2e9cabdef03dcb042c9e6 (diff) | |
| download | quickshell-b074d4927f699dc662a56c701d31787b711e331a.tar.gz quickshell-b074d4927f699dc662a56c701d31787b711e331a.zip | |
island: the Sonix player's icon and controls panel
Diffstat (limited to 'desktop/island/StatusPill.qml')
| -rw-r--r-- | desktop/island/StatusPill.qml | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/desktop/island/StatusPill.qml b/desktop/island/StatusPill.qml index 99f1512..1ad4f77 100644 --- a/desktop/island/StatusPill.qml +++ b/desktop/island/StatusPill.qml @@ -17,8 +17,8 @@ import QtQuick import ".." import "Logic.js" as Logic -// Headphones icon (while Sony headphones are connected), volume icon, tray, -// layout flag. The headphones and volume icons open their panels in this +// Sonix player icon (while it is on the network), headphones icon (while +// Sony headphones are connected), volume icon, tray, layout flag. The headphones and volume icons open their panels in this // capsule; the tray is a plain tray; the flag switches layout on scroll and // ignores clicks. Capsule { @@ -36,6 +36,7 @@ Capsule { signal openSound() signal openHeadphones() + signal openSonix() signal closePanel() signal openDrawer() // A tray menu opening and closing. display() reports no close, so menus @@ -50,10 +51,12 @@ Capsule { onClosed: pill.menuClosed() } - expanded: panel === "sound" || panel === "headphones" + expanded: panel === "sound" || panel === "headphones" || panel === "sonix" restWidth: restRow.implicitWidth + 24 panelWidth: 320 - panelHeight: (panel === "headphones" ? phonesPanel.implicitHeight : soundPanel.implicitHeight) + 28 + panelHeight: (panel === "headphones" ? phonesPanel.implicitHeight + : panel === "sonix" ? sonixPanel.implicitHeight + : soundPanel.implicitHeight) + 28 Row { @@ -64,6 +67,28 @@ Capsule { visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: 120 } } + // The Sonix player, while its beacon is heard. A dot under it while + // it plays. + IconImage { + visible: Sonix.present + anchors.verticalCenter: parent.verticalCenter + implicitSize: 18 + source: Quickshell.iconPath("multimedia-player", true) + + Rectangle { + visible: Sonix.player.state === 1 + anchors { horizontalCenter: parent.horizontalCenter; top: parent.bottom; topMargin: 1 } + width: 4; height: 4; radius: 2 + color: Theme.accent + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: pill.openSonix() + } + } + IconImage { visible: pill.phones !== null anchors.verticalCenter: parent.verticalCenter @@ -170,4 +195,16 @@ Capsule { visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: 160 } } } + + SonixPanel { + id: sonixPanel + x: 14 + y: 14 + width: pill.panelWidth - 28 + open: pill.panel === "sonix" + onClose: pill.closePanel() + opacity: open ? 1 : 0 + visible: opacity > 0 + Behavior on opacity { NumberAnimation { duration: 160 } } + } } |
