Skip to content

Commit

Permalink
Fix restore volume after mute
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbrechtL committed Oct 8, 2024
1 parent bc9682a commit 86a6fda
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/welle-gui/QML/MainView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,13 @@ ApplicationWindow {

onPressAndHold: volumePopup.open()
onClicked: {
if(radioController.volume !== 0)
if(radioController.volume !== 0) {
volumeSlider.valueBeforeMute = volumeSlider.value
volumeSlider.value = 0
else
volumeSlider.value = 1
}
else {
volumeSlider.value = volumeSlider.valueBeforeMute
}
}

Accessible.role: Accessible.Button
Expand All @@ -265,6 +268,8 @@ ApplicationWindow {
Slider {
id: volumeSlider

property real valueBeforeMute: 1

Layout.alignment: Qt.AlignCenter

height: 100
Expand Down

0 comments on commit 86a6fda

Please sign in to comment.