[app/mpris] Use property binding
This commit is contained in:
parent
cefe6eec14
commit
6cbaaa1a80
1 changed files with 1 additions and 3 deletions
|
@ -56,7 +56,6 @@ Kirigami.Page
|
||||||
{
|
{
|
||||||
muted = !muted
|
muted = !muted
|
||||||
root.pluginInterface.volume = muted ? 0 : volumeUnmuted
|
root.pluginInterface.volume = muted ? 0 : volumeUnmuted
|
||||||
muteButton.icon.name = muted ? "audio-volume-muted" : soundState(root.pluginInterface.volume)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function msToTime(currentTime, totalTime)
|
function msToTime(currentTime, totalTime)
|
||||||
|
@ -163,7 +162,7 @@ Kirigami.Page
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Button {
|
Button {
|
||||||
id: muteButton
|
id: muteButton
|
||||||
icon.name: soundState(root.pluginInterface.volume)
|
icon.name: muted ? "audio-volume-muted" : soundState(root.pluginInterface.volume)
|
||||||
onClicked: toggleMute()
|
onClicked: toggleMute()
|
||||||
}
|
}
|
||||||
Slider {
|
Slider {
|
||||||
|
@ -175,7 +174,6 @@ Kirigami.Page
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
volumeUnmuted = value
|
volumeUnmuted = value
|
||||||
root.pluginInterface.volume = value
|
root.pluginInterface.volume = value
|
||||||
muteButton.icon.name = soundState(root.pluginInterface.volume)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue