Fix Noise Reduction visibility in Audio.qml

This commit is contained in:
Kalila L 2021-02-11 06:09:28 -05:00
parent 5b1549a24e
commit 97fdd372af

View file

@ -583,6 +583,7 @@ Rectangle {
labelTextSize: 16; labelTextSize: 16;
backgroundOnColor: "#E3E3E3"; backgroundOnColor: "#E3E3E3";
checked: AudioScriptingInterface.noiseReductionAutomatic; checked: AudioScriptingInterface.noiseReductionAutomatic;
visible: AudioScriptingInterface.noiseReduction === true;
onCheckedChanged: { onCheckedChanged: {
AudioScriptingInterface.noiseReductionAutomatic = checked; AudioScriptingInterface.noiseReductionAutomatic = checked;
checked = Qt.binding(function() { return AudioScriptingInterface.noiseReductionAutomatic; }); // restore binding checked = Qt.binding(function() { return AudioScriptingInterface.noiseReductionAutomatic; }); // restore binding
@ -598,7 +599,7 @@ Rectangle {
anchors.topMargin: 16; anchors.topMargin: 16;
width: parent.width - margins.paddings*2; width: parent.width - margins.paddings*2;
height: avatarGainSliderTextMetrics.height; height: avatarGainSliderTextMetrics.height;
visible: AudioScriptingInterface.noiseReductionAutomatic !== true; visible: AudioScriptingInterface.noiseReduction === true && AudioScriptingInterface.noiseReductionAutomatic !== true;
HifiControlsUit.Slider { HifiControlsUit.Slider {
id: noiseReductionThresholdSlider id: noiseReductionThresholdSlider