diff --git a/modules/Mpris.qml b/modules/Mpris.qml index e3295d0..f80c841 100644 --- a/modules/Mpris.qml +++ b/modules/Mpris.qml @@ -12,7 +12,7 @@ M.BarSection { tooltip: "" property int _playerIdx: 0 - readonly property var _players: Mpris.players.values ?? [] + readonly property var _players: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused) readonly property MprisPlayer player: _players[_playerIdx] ?? _players[0] ?? null readonly property bool playing: player?.playbackState === MprisPlaybackState.Playing diff --git a/modules/Volume.qml b/modules/Volume.qml index c75abe5..eae863f 100644 --- a/modules/Volume.qml +++ b/modules/Volume.qml @@ -69,7 +69,7 @@ M.BarSection { Timer { id: _collapseTimer - interval: 500 + interval: 1500 onTriggered: root._expanded = false } @@ -81,7 +81,8 @@ M.BarSection { MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - onClicked: root._expanded = !root._expanded + onClicked: if (root.sink?.audio) + root.sink.audio.muted = !root.sink.audio.muted } } M.BarLabel { @@ -92,7 +93,8 @@ M.BarSection { MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor - onClicked: root._expanded = !root._expanded + onClicked: if (root.sink?.audio) + root.sink.audio.muted = !root.sink.audio.muted } } @@ -197,18 +199,40 @@ M.BarSection { } } - // Sink name - Text { + // Sink name — click to expand/collapse device list + Item { width: parent.width - height: 18 - horizontalAlignment: Text.AlignHCenter - text: root.sink?.description ?? root.sink?.name ?? "" - color: M.Theme.base04 - font.pixelSize: M.Theme.fontSize - 2 - font.family: M.Theme.fontFamily - elide: Text.ElideRight - leftPadding: 12 - rightPadding: 12 + height: 22 + + Text { + anchors.left: parent.left + anchors.right: chevron.left + anchors.leftMargin: 12 + anchors.rightMargin: 4 + anchors.verticalCenter: parent.verticalCenter + text: root.sink?.description ?? root.sink?.name ?? "" + color: M.Theme.base04 + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily + elide: Text.ElideRight + } + + Text { + id: chevron + anchors.right: parent.right + anchors.rightMargin: 12 + anchors.verticalCenter: parent.verticalCenter + text: root._expanded ? "\uF077" : "\uF078" + color: M.Theme.base04 + font.pixelSize: M.Theme.fontSize - 3 + font.family: M.Theme.iconFontFamily + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: root._expanded = !root._expanded + } } // Expanded: output device list diff --git a/modules/hex_wave.frag b/modules/hex_wave.frag index 6c0e4c2..6f204df 100644 --- a/modules/hex_wave.frag +++ b/modules/hex_wave.frag @@ -77,7 +77,8 @@ void main() { if (wf > 0.01 && edgeFactor > 0.0) { // Vary shimmer color across theme gradient using angle + position float angle = atan(p.y, p.x); - float t = fract((angle + 3.14159) / 6.28318 + center.x * 0.003 + center.y * 0.005); + float rawT = fract((angle + 3.14159) / 6.28318 + center.x * 0.003 + center.y * 0.005); + float t = abs(rawT * 2.0 - 1.0); // triangle wave → uC0→uC1→uC2→uC1→uC0, no hard jump vec3 shimmerColor = themeGradient(t); float shimmer = edgeFactor * wf;