diff --git a/src/res/qml/audio_page/AudioPage.qml b/src/res/qml/audio_page/AudioPage.qml index 1626c31..a54af80 100644 --- a/src/res/qml/audio_page/AudioPage.qml +++ b/src/res/qml/audio_page/AudioPage.qml @@ -49,25 +49,7 @@ MyStackViewPage { } PttButtons { } - RowLayout { - MyToggleButton { - id: audioPttShowNotificationToggle - Layout.leftMargin: 350 - text: "Show notification in HMD" - onCheckedChanged: { - AudioTabController.setPttShowNotification(checked, false) - } - } - MyToggleButton { - id: audioPttReverseToggle - Layout.leftMargin: 118 - text: "Push-to-Mute" - onClicked: { - AudioTabController.setMicReversePtt(checked, false) - } - } - } RowLayout { spacing: 10 @@ -186,18 +168,10 @@ MyStackViewPage { Component.onCompleted: { reloadPttProfiles() reloadAudioProfiles() - audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification - audioPttReverseToggle.checked = AudioTabController.micReversePtt } Connections { target: AudioTabController - onMicReversePttChanged: { - audioPttReverseToggle.checked = AudioTabController.micReversePtt - } - onPttShowNotificationChanged: { - audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification - } onPttProfilesUpdated: { reloadPttProfiles() } diff --git a/src/res/qml/audio_page/push_to_talk/PttButtons.qml b/src/res/qml/audio_page/push_to_talk/PttButtons.qml index bc936b7..9378cde 100644 --- a/src/res/qml/audio_page/push_to_talk/PttButtons.qml +++ b/src/res/qml/audio_page/push_to_talk/PttButtons.qml @@ -3,55 +3,77 @@ import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 import "../.." //common imports +ColumnLayout { + RowLayout { + PttControllerConfigDialog { + id: pttControllerConfigDialog + pttControllerConfigClass: AudioTabController + } -RowLayout { - PttControllerConfigDialog { - id: pttControllerConfigDialog - pttControllerConfigClass: AudioTabController + MyToggleButton { + id: audioPttEnabledToggle + Layout.preferredWidth: 260 + text: "Push-to-Talk:" + onClicked: { + AudioTabController.pttEnabled = checked + } + } + MyToggleButton { + id: audioPttLeftControllerToggle + text: "Left Controller" + onClicked: { + AudioTabController.setPttLeftControllerEnabled(checked, false) + } + } + MyPushButton { + text: "Configure" + onClicked: { + pttControllerConfigDialog.openPopup(0) + } + } + Item { + Layout.fillWidth: true + } + MyToggleButton { + id: audioPttRightControllerToggle + text: "Right Controller" + onClicked: { + AudioTabController.setPttRightControllerEnabled(checked, false) + } + } + MyPushButton { + text: "Configure" + onClicked: { + pttControllerConfigDialog.openPopup(1) + } + } + } + RowLayout { + + MyToggleButton { + id: audioPttShowNotificationToggle + Layout.leftMargin: 350 + text: "Show notification in HMD" + onCheckedChanged: { + AudioTabController.setPttShowNotification(checked, false) + } + } + MyToggleButton { + id: audioPttReverseToggle + Layout.leftMargin: 118 + text: "Push-to-Mute" + onClicked: { + AudioTabController.setMicReversePtt(checked, false) + } + } } - MyToggleButton { - id: audioPttEnabledToggle - Layout.preferredWidth: 260 - text: "Push-to-Talk:" - onClicked: { - AudioTabController.pttEnabled = checked - } - } - MyToggleButton { - id: audioPttLeftControllerToggle - text: "Left Controller" - onClicked: { - AudioTabController.setPttLeftControllerEnabled(checked, false) - } - } - MyPushButton { - text: "Configure" - onClicked: { - pttControllerConfigDialog.openPopup(0) - } - } - Item { - Layout.fillWidth: true - } - MyToggleButton { - id: audioPttRightControllerToggle - text: "Right Controller" - onClicked: { - AudioTabController.setPttRightControllerEnabled(checked, false) - } - } - MyPushButton { - text: "Configure" - onClicked: { - pttControllerConfigDialog.openPopup(1) - } - } Component.onCompleted: { - audioPttEnabledToggle.checked = AudioTabController.pttEnabled - audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled - audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled - + audioPttEnabledToggle.checked = AudioTabController.pttEnabled + audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled + audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled + audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification + audioPttReverseToggle.checked = AudioTabController.micReversePtt } Connections { target: AudioTabController @@ -64,5 +86,11 @@ RowLayout { onPttRightControllerEnabledChanged: { audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled } + onMicReversePttChanged: { + audioPttReverseToggle.checked = AudioTabController.micReversePtt + } + onPttShowNotificationChanged: { + audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification + } } }