From e22d2ccee82b829875fe343cf1be48975174b054 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 15 Oct 2026 11:24:49 +0200 Subject: refactor(island): the controls panel goes Each of its seven tiles opened a drawer page that already existed, and it went unused. SUPER alone will open the drawer instead. Removed with it: the status pill's controls icon, Island.toggleControls, the island IPC target, Controls.js and its test, and the controls list in Prefs. Prefs now holds only the pinned IP; a controls key left in desktop.json is still kept on write, because writes merge into the parsed document. Co-Authored-By: Claude Opus 5.5 --- desktop/island/StatusPill.qml | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) (limited to 'desktop/island/StatusPill.qml') diff --git a/desktop/island/StatusPill.qml b/desktop/island/StatusPill.qml index d62b87f..f064f98 100644 --- a/desktop/island/StatusPill.qml +++ b/desktop/island/StatusPill.qml @@ -17,8 +17,8 @@ import ".." import "perf" import "Logic.js" as Logic -// Performance icon, controls icon, volume icon, tray, layout flag. The -// performance, controls and volume icons open their panels in this capsule; +// Performance icon, volume icon, tray, layout flag. The performance 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 { @@ -30,28 +30,21 @@ Capsule { property string panel: "" signal openSound() - signal openControls() signal openPerf() 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" || panel === "controls" || panel === "perf" + expanded: panel === "sound" || panel === "perf" restWidth: restRow.implicitWidth + 24 panelWidth: panel === "perf" ? 600 : 320 - panelHeight: (panel === "controls" ? controlsPanel.implicitHeight - : panel === "perf" ? (perfPanel.item ? perfPanel.item.implicitHeight : 0) + panelHeight: (panel === "perf" ? (perfPanel.item ? perfPanel.item.implicitHeight : 0) : soundPanel.implicitHeight) + 28 // The detailed sampling (per-core, network, VRAM) runs only while the // panel shows it. Binding { target: Perf; property: "detailed"; value: pill.panel === "perf" } - // Edit mode never outlives its panel. - onPanelChanged: controlsPanel.editing = false - Row { id: restRow anchors.centerIn: parent @@ -90,18 +83,6 @@ 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 @@ -179,18 +160,6 @@ Capsule { 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) - } - // Loaded only while open: its models are fresh arrays every sample, and // a hidden instance would rebuild its rows every 2s for the whole session. Loader { -- cgit v1.2.3