Use MobileForm.FormSpinBoxDelegate for SpinBox in proxy page
This commit is contained in:
@@ -70,27 +70,17 @@ Kirigami.ScrollablePage {
|
|||||||
proxyConfigChanged = true
|
proxyConfigChanged = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// we probably still need a FormSpinBoxDelegate
|
MobileForm.FormSpinBoxDelegate {
|
||||||
MobileForm.AbstractFormDelegate {
|
id: portField
|
||||||
Layout.fillWidth: true
|
label: i18n("Port")
|
||||||
contentItem: RowLayout {
|
value: Config.proxyPort
|
||||||
QQC2.Label {
|
from: 0
|
||||||
text: i18n("Port")
|
to: 65536
|
||||||
Layout.fillWidth: true
|
textFromValue: function(value, locale) {
|
||||||
}
|
return value // it will add a thousands separator if we don't do this, not sure why
|
||||||
QQC2.SpinBox {
|
}
|
||||||
id: portField
|
onValueChanged: {
|
||||||
value: Config.proxyPort
|
proxyConfigChanged = true
|
||||||
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.FormTextFieldDelegate {
|
MobileForm.FormTextFieldDelegate {
|
||||||
|
|||||||
Reference in New Issue
Block a user