diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-13 09:54:18 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-13 09:54:18 +0200 |
| commit | c635798c7e782af84ba1cf592e93619376a93d8a (patch) | |
| tree | 82d3e30426a1ce199fc9566de3c01f11947de85c /desktop/island/StatusPill.qml | |
| parent | 934fdbeb44ff96d86840e20f5d69497556539aa9 (diff) | |
| download | quickshell-c635798c7e782af84ba1cf592e93619376a93d8a.tar.gz quickshell-c635798c7e782af84ba1cf592e93619376a93d8a.zip | |
feat(island): controls panel in the status pill, island IPC
A settings icon in the status pill opens the controls panel in the same
capsule the sound panel uses. Right-click on a tile closes the panel and
opens its drawer page. The island IPC target reveals the island and
toggles the panel, for the SUPER release bind.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/island/StatusPill.qml')
| -rw-r--r-- | desktop/island/StatusPill.qml | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/desktop/island/StatusPill.qml b/desktop/island/StatusPill.qml index 5ab8f95..1b84ec1 100644 --- a/desktop/island/StatusPill.qml +++ b/desktop/island/StatusPill.qml @@ -16,9 +16,9 @@ import QtQuick import ".." import "Logic.js" as Logic -// Volume icon, tray, layout flag. The volume icon is the only way into the -// sound panel and has no other gesture; the tray is a plain tray; the flag -// switches layout on scroll and ignores clicks. +// Controls icon, volume icon, tray, layout flag. The controls 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 { id: pill @@ -28,14 +28,20 @@ Capsule { property string panel: "" signal openSound() + signal openControls() signal openDrawer() + // A drawer page, from a control tile's right-click. + signal openPage(string page) // Emitted just before a tray menu opens; the menu cannot report its close. signal menuShown() - expanded: panel === "sound" + expanded: panel !== "" restWidth: restRow.implicitWidth + 24 panelWidth: 320 - panelHeight: soundPanel.implicitHeight + 28 + panelHeight: (panel === "controls" ? controlsPanel.implicitHeight : soundPanel.implicitHeight) + 28 + + // Edit mode never outlives its panel. + onPanelChanged: controlsPanel.editing = false Row { id: restRow @@ -48,6 +54,18 @@ Capsule { IconImage { anchors.verticalCenter: parent.verticalCenter implicitSize: 18 + source: Quickshell.iconPath("preferences-system", true) + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: pill.openControls() + } + } + + IconImage { + anchors.verticalCenter: parent.verticalCenter + implicitSize: 18 source: Quickshell.iconPath(Logic.volumeIcon(pill.sound.volume, pill.sound.muted), true) MouseArea { @@ -116,9 +134,21 @@ Capsule { y: 14 width: pill.panelWidth - 28 sound: pill.sound - opacity: pill.expanded ? 1 : 0 + opacity: pill.panel === "sound" ? 1 : 0 visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: 160 } } onOpenDrawer: pill.openDrawer() } + + ControlsPanel { + id: controlsPanel + x: 14 + y: 14 + width: pill.panelWidth - 28 + sound: pill.sound + opacity: pill.panel === "controls" ? 1 : 0 + visible: opacity > 0 + Behavior on opacity { NumberAnimation { duration: 160 } } + onOpenDrawer: page => pill.openPage(page) + } } |
