updating compile failure + icons/settings update

This commit is contained in:
Wayne Chen 2019-03-06 17:29:32 -08:00 committed by Wayne Chen
parent 39db3979b9
commit 88d8163b04

View file

@ -154,7 +154,23 @@ Rectangle {
}
AudioControls.CheckBox {
spacing: muteMic.spacing
text: qsTr("Push To Talk");
text: qsTr("Show audio level meter");
checked: AvatarInputs.showAudioTools;
onClicked: {
AvatarInputs.showAudioTools = checked;
checked = Qt.binding(function() { return AvatarInputs.showAudioTools; }); // restore binding
}
onXChanged: rightMostInputLevelPos = x + width
}
}
Separator {}
ColumnLayout {
spacing: muteMic.spacing;
AudioControls.CheckBox {
spacing: muteMic.spacing
text: qsTr("Push To Talk (T)");
checked: isVR ? AudioScriptingInterface.pushToTalkHMD : AudioScriptingInterface.pushToTalkDesktop;
onClicked: {
if (isVR) {
@ -171,15 +187,41 @@ Rectangle {
}); // restore binding
}
}
AudioControls.CheckBox {
spacing: muteMic.spacing
text: qsTr("Show audio level meter");
checked: AvatarInputs.showAudioTools;
onClicked: {
AvatarInputs.showAudioTools = checked;
checked = Qt.binding(function() { return AvatarInputs.showAudioTools; }); // restore binding
Item {
id: pttTextContainer
x: margins.paddings;
width: rightMostInputLevelPos
height: pttTextMetrics.height
visible: true
TextMetrics {
id: pttTextMetrics
text: pttText.text
font: pttText.font
}
RalewayRegular {
id: pttText
wrapMode: Text.WordWrap
color: hifi.colors.white;
width: parent.width;
font.italic: true
size: 16;
text: isVR ? qsTr("Press and hold grip triggers on both of your controllers to unmute.") :
qsTr("Press and hold the button \"T\" to unmute.");
onTextChanged: {
if (pttTextMetrics.width > rightMostInputLevelPos) {
pttTextContainer.height = Math.ceil(pttTextMetrics.width / rightMostInputLevelPos) * pttTextMetrics.height;
} else {
pttTextContainer.height = pttTextMetrics.height;
}
}
}
Component.onCompleted: {
if (pttTextMetrics.width > rightMostInputLevelPos) {
pttTextContainer.height = Math.ceil(pttTextMetrics.width / rightMostInputLevelPos) * pttTextMetrics.height;
} else {
pttTextContainer.height = pttTextMetrics.height;
}
}
onXChanged: rightMostInputLevelPos = x + width
}
}