Compare commits

..

No commits in common. "c30f18a2ee251e29425194412cc1158a8ed65ede" and "5e91c86ab61affb41417f769b1e7637428144f8e" have entirely different histories.

3 changed files with 16 additions and 41 deletions

View file

@ -12,7 +12,7 @@ M.BarSection {
tooltip: "" tooltip: ""
property int _playerIdx: 0 property int _playerIdx: 0
readonly property var _players: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused) readonly property var _players: Mpris.players.values ?? []
readonly property MprisPlayer player: _players[_playerIdx] ?? _players[0] ?? null readonly property MprisPlayer player: _players[_playerIdx] ?? _players[0] ?? null
readonly property bool playing: player?.playbackState === MprisPlaybackState.Playing readonly property bool playing: player?.playbackState === MprisPlaybackState.Playing

View file

@ -69,7 +69,7 @@ M.BarSection {
Timer { Timer {
id: _collapseTimer id: _collapseTimer
interval: 1500 interval: 500
onTriggered: root._expanded = false onTriggered: root._expanded = false
} }
@ -81,8 +81,7 @@ M.BarSection {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: if (root.sink?.audio) onClicked: root._expanded = !root._expanded
root.sink.audio.muted = !root.sink.audio.muted
} }
} }
M.BarLabel { M.BarLabel {
@ -93,8 +92,7 @@ M.BarSection {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: if (root.sink?.audio) onClicked: root._expanded = !root._expanded
root.sink.audio.muted = !root.sink.audio.muted
} }
} }
@ -199,40 +197,18 @@ M.BarSection {
} }
} }
// Sink name click to expand/collapse device list // Sink name
Item { Text {
width: parent.width width: parent.width
height: 22 height: 18
horizontalAlignment: Text.AlignHCenter
Text { text: root.sink?.description ?? root.sink?.name ?? ""
anchors.left: parent.left color: M.Theme.base04
anchors.right: chevron.left font.pixelSize: M.Theme.fontSize - 2
anchors.leftMargin: 12 font.family: M.Theme.fontFamily
anchors.rightMargin: 4 elide: Text.ElideRight
anchors.verticalCenter: parent.verticalCenter leftPadding: 12
text: root.sink?.description ?? root.sink?.name ?? "" rightPadding: 12
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 // Expanded: output device list

View file

@ -77,8 +77,7 @@ void main() {
if (wf > 0.01 && edgeFactor > 0.0) { if (wf > 0.01 && edgeFactor > 0.0) {
// Vary shimmer color across theme gradient using angle + position // Vary shimmer color across theme gradient using angle + position
float angle = atan(p.y, p.x); float angle = atan(p.y, p.x);
float rawT = fract((angle + 3.14159) / 6.28318 + center.x * 0.003 + center.y * 0.005); float t = 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); vec3 shimmerColor = themeGradient(t);
float shimmer = edgeFactor * wf; float shimmer = edgeFactor * wf;