From d203d938f005d7542bf13e217ac51917866a8ace Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 14 Sep 2026 12:24:13 +0200 Subject: feat(desktop): move volume-osd in as the sound module VolumeOsd.qml did three jobs in one file: PipeWire tracking, the OSD surface and the player transport. They become Service, Osd and the page. The OSD keeps its namespace so the existing Hyprland blur rule still matches, and the service stays always-active because the OSD has to answer a keypress with no drawer open. --- desktop/modules/sound/TransportButton.qml | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 desktop/modules/sound/TransportButton.qml (limited to 'desktop/modules/sound/TransportButton.qml') diff --git a/desktop/modules/sound/TransportButton.qml b/desktop/modules/sound/TransportButton.qml new file mode 100644 index 0000000..2c1f498 --- /dev/null +++ b/desktop/modules/sound/TransportButton.qml @@ -0,0 +1,39 @@ +// Copyright (C) 2026 Danilo M. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +import QtQuick +import "../.." + +Rectangle { + id: btn + property string glyph: "" + property bool enabled: true + signal clicked + + width: 30; height: 30; radius: 15 + color: area.containsMouse && enabled ? Qt.alpha(Theme.accent, 0.22) : "transparent" + opacity: enabled ? 1 : 0.35 + + Text { + anchors.centerIn: parent + text: btn.glyph + font { family: Theme.fontFamily; pixelSize: 14 } + color: Theme.text + } + + MouseArea { + id: area + anchors.fill: parent + hoverEnabled: true + cursorShape: btn.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor + onClicked: if (btn.enabled) btn.clicked() + } +} -- cgit v1.2.3