Use FormTextFieldDelegate for host field

This commit is contained in:
Gary Wang
2022-11-16 23:43:59 +08:00
committed by Carl Schwan
parent ff98e378e6
commit f6b2340016

View File

@@ -59,25 +59,16 @@ Kirigami.ScrollablePage {
MobileForm.FormCardHeader { MobileForm.FormCardHeader {
title: i18n("Proxy Settings") title: i18n("Proxy Settings")
} }
// TODO: switch to FormTextFieldDelegate once kirigami-addons got a new release MobileForm.FormTextFieldDelegate {
MobileForm.AbstractFormDelegate { id: hostField
Layout.fillWidth: true label: i18n("Host")
contentItem: RowLayout { text: Config.proxyHost
QQC2.Label { // inputMethodHints: Qt.ImhUrlCharactersOnly
text: i18n("Host") onEditingFinished: {
Layout.fillWidth: true proxyConfigChanged = true
}
QQC2.TextField {
id: hostField
Kirigami.FormData.label: i18n("Proxy Host")
text: Config.proxyHost
inputMethodHints: Qt.ImhUrlCharactersOnly
onEditingFinished: {
proxyConfigChanged = true
}
}
} }
} }
// we probably still need a FormSpinBoxDelegate
MobileForm.AbstractFormDelegate { MobileForm.AbstractFormDelegate {
Layout.fillWidth: true Layout.fillWidth: true
contentItem: RowLayout { contentItem: RowLayout {