diff --git a/applet/contents/config/main.xml b/applet/contents/config/main.xml --- a/applet/contents/config/main.xml +++ b/applet/contents/config/main.xml @@ -12,7 +12,10 @@ 5 - + + true + + true diff --git a/applet/contents/ui/ConfigGeneral.qml b/applet/contents/ui/ConfigGeneral.qml --- a/applet/contents/ui/ConfigGeneral.qml +++ b/applet/contents/ui/ConfigGeneral.qml @@ -27,7 +27,8 @@ Item { property alias cfg_maximumVolume: maximumVolume.value property alias cfg_volumeStep: volumeStep.value - property alias cfg_volumeFeedback: volumeFeedback.checked + property alias cfg_volumeAudioFeedback: volumeAudioFeedback.checked + property alias cfg_volumeOsdFeedback: volumeOsdFeedback.checked property alias cfg_outputChangeOsd: outputChangeOsd.checked ColumnLayout { @@ -77,11 +78,16 @@ ColumnLayout { CheckBox { - id: volumeFeedback - text: i18n("Volume feedback") + id: volumeAudioFeedback + text: i18n("Audio feedback when output volume changes") enabled: feedback.valid } + CheckBox { + id: volumeOsdFeedback + text: i18n("Visual feedback when output volume changes") + } + CheckBox { id: outputChangeOsd text: i18n("Visual feedback when default output device changes") diff --git a/applet/contents/ui/main.qml b/applet/contents/ui/main.qml --- a/applet/contents/ui/main.qml +++ b/applet/contents/ui/main.qml @@ -33,7 +33,6 @@ Item { id: main - property bool volumeFeedback: Plasmoid.configuration.volumeFeedback property int maxVolumeValue: Math.round(Plasmoid.configuration.maximumVolume * PulseAudio.NormalVolume / 100.0) property int volumeStep: Math.round(Plasmoid.configuration.volumeStep * PulseAudio.NormalVolume / 100.0) property string displayName: i18n("Audio Volume") @@ -80,7 +79,9 @@ var percent = volumePercent(volume, maxVolumeValue); paSinkModel.preferredSink.muted = percent == 0; paSinkModel.preferredSink.volume = volume; - osd.show(percent); + if (plasmoid.configuration.volumeOsdFeedback) { + osd.show(percent); + } playFeedback(); } @@ -92,7 +93,9 @@ var percent = volumePercent(volume, maxVolumeValue); paSinkModel.preferredSink.muted = percent == 0; paSinkModel.preferredSink.volume = volume; - osd.show(percent); + if (plasmoid.configuration.volumeOsdFeedback) { + osd.show(percent); + } playFeedback(); } @@ -102,7 +105,9 @@ } var toMute = !paSinkModel.preferredSink.muted; paSinkModel.preferredSink.muted = toMute; - osd.show(toMute ? 0 : volumePercent(paSinkModel.preferredSink.volume, maxVolumeValue)); + if (plasmoid.configuration.volumeOsdFeedback) { + osd.show(toMute ? 0 : volumePercent(paSinkModel.preferredSink.volume, maxVolumeValue)); + } playFeedback(); } @@ -138,7 +143,7 @@ } function playFeedback(sinkIndex) { - if (!volumeFeedback) { + if (!plasmoid.configuration.volumeAudioFeedback) { return; } if (sinkIndex == undefined) {