From b72ca6719820c9af7f778e3e9df3cc7482a96b49 Mon Sep 17 00:00:00 2001 From: Damocles Date: Mon, 13 Apr 2026 23:38:45 +0200 Subject: [PATCH 1/2] offset volume mixer popup below OSD slider panel --- modules/HoverPanel.qml | 4 +++- modules/Volume.qml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/HoverPanel.qml b/modules/HoverPanel.qml index 377a75d..da37516 100644 --- a/modules/HoverPanel.qml +++ b/modules/HoverPanel.qml @@ -45,12 +45,14 @@ PanelWindow { WlrLayershell.exclusiveZone: 0 WlrLayershell.namespace: root.panelNamespace + property real topMargin: 0 + anchors.top: true anchors.left: true anchors.right: true anchors.bottom: true - margins.top: 0 + margins.top: topMargin function _updatePosition() { const scr = screen; diff --git a/modules/Volume.qml b/modules/Volume.qml index e505d75..2004837 100644 --- a/modules/Volume.qml +++ b/modules/Volume.qml @@ -222,6 +222,7 @@ M.BarSection { M.HoverPanel { popupMode: true + topMargin: 58 accentColor: root.accentColor screen: root.bar.screen anchorX: root.mapToGlobal(root.width / 2, 0).x - (root.bar.screen?.x ?? 0) From f46b7d6c55c789e11d40caa4ed3b398652a945e2 Mon Sep 17 00:00:00 2001 From: Damocles Date: Mon, 13 Apr 2026 23:42:30 +0200 Subject: [PATCH 2/2] revert volume to single hoverpanel, device list expands in-place --- modules/Bar.qml | 1 - modules/Volume.qml | 46 ++++++++++++++++++++++------------------------ 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/modules/Bar.qml b/modules/Bar.qml index e1efa6f..f200738 100644 --- a/modules/Bar.qml +++ b/modules/Bar.qml @@ -171,7 +171,6 @@ PanelWindow { } M.Volume { visible: M.Modules.volume.enable - bar: bar } } diff --git a/modules/Volume.qml b/modules/Volume.qml index 2004837..cf63c43 100644 --- a/modules/Volume.qml +++ b/modules/Volume.qml @@ -38,9 +38,13 @@ M.BarSection { return streams; } + property bool _expanded: false property bool _osdActive: false readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered - readonly property bool _showPanel: _anyHover || _osdActive + readonly property bool _showPanel: _anyHover || _expanded || _osdActive + + on_ShowPanelChanged: if (!_showPanel) + _expanded = false onVolumeChanged: _flashPanel() onMutedChanged: _flashPanel() @@ -56,8 +60,6 @@ M.BarSection { onTriggered: root._osdActive = false } - required property var bar - M.BarIcon { icon: root._volumeIcon minIcon: "\uF028" @@ -91,7 +93,6 @@ M.BarSection { } } - // OSD panel — hover shows slider only, fixed height, no resize M.HoverPanel { id: hoverPanel showPanel: root._showPanel @@ -179,7 +180,7 @@ M.BarSection { } } - // Sink name row — click chevron to open mixer popup + // Sink name + chevron Item { width: parent.width height: 22 @@ -202,7 +203,7 @@ M.BarSection { anchors.right: parent.right anchors.rightMargin: 12 anchors.verticalCenter: parent.verticalCenter - text: "\uF078" + text: root._expanded ? "\uF077" : "\uF078" color: M.Theme.base04 font.pixelSize: M.Theme.fontSize - 3 font.family: M.Theme.iconFontFamily @@ -210,24 +211,15 @@ M.BarSection { TapHandler { cursorShape: Qt.PointingHandCursor - onTapped: mixerLoader.active = true + onTapped: root._expanded = !root._expanded } } - } - // Mixer popup — separate window, no resize issues - LazyLoader { - id: mixerLoader - active: false - - M.HoverPanel { - popupMode: true - topMargin: 58 - accentColor: root.accentColor - screen: root.bar.screen - anchorX: root.mapToGlobal(root.width / 2, 0).x - (root.bar.screen?.x ?? 0) - contentWidth: 220 - onDismissed: mixerLoader.active = false + // Device + stream list + Column { + id: deviceList + width: parent.width + visible: root._expanded // Output devices Rectangle { @@ -254,7 +246,7 @@ M.BarSection { delegate: Item { required property var modelData - width: 220 + width: deviceList.width height: 28 readonly property bool _active: modelData === root.sink @@ -289,7 +281,7 @@ M.BarSection { TapHandler { onTapped: { Pipewire.preferredDefaultAudioSink = modelData; - mixerLoader.active = false; + root._expanded = false; } } } @@ -323,7 +315,7 @@ M.BarSection { id: streamEntry required property var modelData - width: 220 + width: deviceList.width height: 32 readonly property string _appName: modelData.properties["application.name"] || modelData.description || modelData.name || "Unknown" @@ -411,6 +403,12 @@ M.BarSection { } } } + + // Bottom padding + Item { + width: 1 + height: 4 + } } } }