|
|
|
|
@ -70,6 +70,18 @@ ControlCenterDialog {
|
|
|
|
|
id: appearance
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VolumeFeedback {
|
|
|
|
|
id: feedback
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
|
id: volumeFeedBackTimer
|
|
|
|
|
interval: 200
|
|
|
|
|
onTriggered: {
|
|
|
|
|
playFeedback()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
property var defaultSink: paSinkModel.defaultSink
|
|
|
|
|
|
|
|
|
|
SinkModel {
|
|
|
|
|
@ -82,6 +94,18 @@ ControlCenterDialog {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function playFeedback(sinkIndex) {
|
|
|
|
|
if (!feedback.valid) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (sinkIndex === undefined) {
|
|
|
|
|
sinkIndex = 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
feedback.play(sinkIndex)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggleBluetooth() {
|
|
|
|
|
const enable = !control.bluetoothDisConnected
|
|
|
|
|
Bluez.Manager.bluetoothBlocked = enable
|
|
|
|
|
@ -394,6 +418,9 @@ ControlCenterDialog {
|
|
|
|
|
|
|
|
|
|
defaultSink.volume = value
|
|
|
|
|
defaultSink.muted = (value === 0)
|
|
|
|
|
|
|
|
|
|
volumeFeedBackTimer.stop()
|
|
|
|
|
volumeFeedBackTimer.restart()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|