forked from Shinonome/dots-hyprland
volume osd: handle mute
This commit is contained in:
@@ -34,6 +34,10 @@ Scope {
|
|||||||
if (!Audio.ready) return
|
if (!Audio.ready) return
|
||||||
root.triggerOsd()
|
root.triggerOsd()
|
||||||
}
|
}
|
||||||
|
function onMutedChanged() {
|
||||||
|
if (!Audio.ready) return
|
||||||
|
root.triggerOsd()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
@@ -97,7 +101,7 @@ Scope {
|
|||||||
id: osdValues
|
id: osdValues
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
value: Audio.sink?.audio.volume ?? 0
|
value: Audio.sink?.audio.volume ?? 0
|
||||||
icon: "volume_up"
|
icon: Audio.sink?.audio.muted ? "volume_off" : "volume_up"
|
||||||
name: qsTr("Volume")
|
name: qsTr("Volume")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user