fix PageDevMenu

This commit is contained in:
Cyril Anisimov 2024-12-30 00:19:11 +01:00
parent b0fdbe6c4f
commit 32ef1eae84

View file

@ -16,32 +16,28 @@ import "../Components"
PageType { PageType {
id: root id: root
ColumnLayout {
id: backButtonLayout
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: 20
BackButtonType { BackButtonType {
id: backButton id: backButton
}
}
FlickableType {
id: fl
anchors.top: backButtonLayout.bottom
anchors.bottom: parent.bottom
contentHeight: content.implicitHeight
ColumnLayout {
id: content
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.topMargin: 20
}
ListView {
id: listView
anchors.top: backButton.bottom
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
property bool isFocusable: true
ScrollBar.vertical: ScrollBarType {}
header: ColumnLayout {
width: listView.width
HeaderType { HeaderType {
id: header id: header
@ -52,6 +48,14 @@ PageType {
headerText: "Dev menu" headerText: "Dev menu"
} }
}
model: 1
clip: true
spacing: 16
delegate: ColumnLayout {
width: listView.width
TextFieldWithHeaderType { TextFieldWithHeaderType {
id: passwordTextField id: passwordTextField
@ -60,7 +64,6 @@ PageType {
Layout.topMargin: 16 Layout.topMargin: 16
Layout.rightMargin: 16 Layout.rightMargin: 16
Layout.leftMargin: 16 Layout.leftMargin: 16
parentFlickable: fl
headerText: qsTr("Gateway endpoint") headerText: qsTr("Gateway endpoint")
textFieldText: SettingsController.gatewayEndpoint textFieldText: SettingsController.gatewayEndpoint
@ -78,14 +81,18 @@ PageType {
} }
} }
} }
}
footer: ColumnLayout {
width: listView.width
SwitcherType { SwitcherType {
id: switcher id: switcher
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 24
Layout.rightMargin: 16 Layout.rightMargin: 16
Layout.leftMargin: 16 Layout.leftMargin: 16
Layout.topMargin: 16
text: qsTr("Dev gateway environment") text: qsTr("Dev gateway environment")
checked: SettingsController.isDevGatewayEnv checked: SettingsController.isDevGatewayEnv