mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Mobile: Fix Editing of Gradient Factors
Fix the issue that Gradient Factors cannot be set to 100 in the mobile version. This is done by changing the edits from a text box to a spin edit, which seems to be a better match for numerical values. As a side effect this also solves the issue that the keyboard for the text edit is not properly displayed when settings are opened when dive details are already on the page stack. Fixes #3911. Reported-by: @gbetous Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
5d7f294407
commit
50438b0456
2 changed files with 30 additions and 22 deletions
|
@ -228,7 +228,7 @@ TemplatePage {
|
|||
}
|
||||
TemplateSpinBox {
|
||||
from: 1
|
||||
to: 99
|
||||
to: 100
|
||||
stepSize: 1
|
||||
value: Backend.gflow
|
||||
textFromValue: function (value, locale) {
|
||||
|
@ -245,7 +245,7 @@ TemplatePage {
|
|||
}
|
||||
TemplateSpinBox {
|
||||
from: 1
|
||||
to: 99
|
||||
to: 100
|
||||
stepSize: 1
|
||||
value: Backend.gfhigh
|
||||
textFromValue: function (value, locale) {
|
||||
|
|
|
@ -585,16 +585,16 @@ TemplatePage {
|
|||
PrefDisplay.singleColumnPortrait = checked
|
||||
}
|
||||
}
|
||||
TemplateLabel {
|
||||
text: qsTr("Depth line based on ×3 intervals")
|
||||
}
|
||||
SsrfSwitch {
|
||||
checked: PrefDisplay.three_m_based_grid
|
||||
onClicked: {
|
||||
PrefDisplay.three_m_based_grid = checked
|
||||
rootItem.settingsChanged()
|
||||
}
|
||||
}
|
||||
TemplateLabel {
|
||||
text: qsTr("Depth line based on ×3 intervals")
|
||||
}
|
||||
SsrfSwitch {
|
||||
checked: PrefDisplay.three_m_based_grid
|
||||
onClicked: {
|
||||
PrefDisplay.three_m_based_grid = checked
|
||||
rootItem.settingsChanged()
|
||||
}
|
||||
}
|
||||
TemplateLine {
|
||||
visible: sectionAdvanced.isExpanded
|
||||
Layout.columnSpan: 2
|
||||
|
@ -630,12 +630,16 @@ TemplatePage {
|
|||
TemplateLabel {
|
||||
text: qsTr("GFLow")
|
||||
}
|
||||
TemplateTextField {
|
||||
TemplateSpinBox {
|
||||
id: gfLow
|
||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
||||
text: PrefTechnicalDetails.gflow
|
||||
inputMask: "99"
|
||||
onEditingFinished: {
|
||||
from: 1
|
||||
to: 100
|
||||
stepSize: 1
|
||||
value: PrefTechnicalDetails.gflow
|
||||
textFromValue: function (value, locale) {
|
||||
return value + "%"
|
||||
}
|
||||
onValueModified: {
|
||||
PrefTechnicalDetails.gflow = gfLow.text
|
||||
rootItem.settingsChanged()
|
||||
}
|
||||
|
@ -643,12 +647,16 @@ TemplatePage {
|
|||
TemplateLabel {
|
||||
text: qsTr("GFHigh")
|
||||
}
|
||||
TemplateTextField {
|
||||
TemplateSpinBox {
|
||||
id: gfHigh
|
||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2
|
||||
text: PrefTechnicalDetails.gfhigh
|
||||
inputMask: "99"
|
||||
onEditingFinished: {
|
||||
from: 1
|
||||
to: 100
|
||||
stepSize: 1
|
||||
value: PrefTechnicalDetails.gfhigh
|
||||
textFromValue: function (value, locale) {
|
||||
return value + "%"
|
||||
}
|
||||
onValueModified: {
|
||||
PrefTechnicalDetails.gfhigh = gfHigh.text
|
||||
rootItem.settingsChanged()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue