Merge pull request #10760 from zzmp/audio/mute-row

Give audio menu mute checkbox its own row
This commit is contained in:
Zach Pomerantz 2017-06-20 18:24:03 -07:00 committed by GitHub
commit a9ffff6582

View file

@ -52,34 +52,40 @@ Rectangle {
Separator { visible: root.showTitle() } Separator { visible: root.showTitle() }
Grid { ColumnLayout {
columns: 2;
x: 16; // padding does not work x: 16; // padding does not work
spacing: 16; spacing: 16;
AudioControls.CheckBox { // mute is in its own row
text: qsTr("Mute microphone"); RowLayout {
isRedCheck: true; AudioControls.CheckBox {
checked: Audio.muted; text: qsTr("Mute microphone");
onClicked: { isRedCheck: true;
Audio.muted = checked; checked: Audio.muted;
checked = Qt.binding(function() { return Audio.muted; }); // restore binding onClicked: {
Audio.muted = checked;
checked = Qt.binding(function() { return Audio.muted; }); // restore binding
}
} }
} }
AudioControls.CheckBox {
text: qsTr("Enable noise reduction"); RowLayout {
checked: Audio.noiseReduction; spacing: 16;
onClicked: { AudioControls.CheckBox {
Audio.noiseReduction = checked; text: qsTr("Enable noise reduction");
checked = Qt.binding(function() { return Audio.noiseReduction; }); // restore binding checked: Audio.noiseReduction;
onClicked: {
Audio.noiseReduction = checked;
checked = Qt.binding(function() { return Audio.noiseReduction; }); // restore binding
}
} }
} AudioControls.CheckBox {
AudioControls.CheckBox { text: qsTr("Show audio level meter");
text: qsTr("Show audio level meter"); checked: AvatarInputs.showAudioTools;
checked: AvatarInputs.showAudioTools; onClicked: {
onClicked: { AvatarInputs.showAudioTools = checked;
AvatarInputs.showAudioTools = checked; checked = Qt.binding(function() { return AvatarInputs.showAudioTools; }); // restore binding
checked = Qt.binding(function() { return AvatarInputs.showAudioTools; }); // restore binding }
} }
} }
} }