From 034453636d1027da767472eb1cb766869b21a2f8 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Mon, 1 May 2023 14:53:59 +0800 Subject: [PATCH] Use MobileForm.FormSpinBoxDelegate for SpinBox in proxy page --- src/qml/Settings/NetworkProxyPage.qml | 32 +++++++++------------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/src/qml/Settings/NetworkProxyPage.qml b/src/qml/Settings/NetworkProxyPage.qml index cbc8eb9e4..60a79b1e3 100644 --- a/src/qml/Settings/NetworkProxyPage.qml +++ b/src/qml/Settings/NetworkProxyPage.qml @@ -70,27 +70,17 @@ Kirigami.ScrollablePage { proxyConfigChanged = true } } - // we probably still need a FormSpinBoxDelegate - MobileForm.AbstractFormDelegate { - Layout.fillWidth: true - contentItem: RowLayout { - QQC2.Label { - text: i18n("Port") - Layout.fillWidth: true - } - QQC2.SpinBox { - id: portField - value: Config.proxyPort - from: 0 - to: 65536 - validator: IntValidator {bottom: portField.from; top: portField.to} - textFromValue: function(value, locale) { - return value // it will add a thousands separator if we don't do this, not sure why - } - onValueChanged: { - proxyConfigChanged = true - } - } + MobileForm.FormSpinBoxDelegate { + id: portField + label: i18n("Port") + value: Config.proxyPort + from: 0 + to: 65536 + textFromValue: function(value, locale) { + return value // it will add a thousands separator if we don't do this, not sure why + } + onValueChanged: { + proxyConfigChanged = true } } MobileForm.FormTextFieldDelegate {