mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
mobile-widgets: move rest of gridlayout to section advanced
Create section advanced around the remaining gridlayouts, and adjust. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5bce4895cc
commit
11c6851c74
1 changed files with 131 additions and 141 deletions
|
@ -380,164 +380,154 @@ Kirigami.ScrollablePage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
TemplateSection {
|
||||||
id: gpsPrefs
|
id: sectionAdvanced
|
||||||
columns: 2
|
title: qsTr("Advanced")
|
||||||
|
|
||||||
TemplateLabel {
|
GridLayout {
|
||||||
text: qsTr("GPS location service")
|
id: gpsPrefs
|
||||||
font.pointSize: subsurfaceTheme.headingPointSize
|
visible: sectionAdvanced.isExpanded
|
||||||
font.weight: Font.Light
|
columns: 2
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
||||||
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
|
||||||
Layout.columnSpan: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
TemplateLabel {
|
TemplateLabel {
|
||||||
text: qsTr("Distance threshold (meters)")
|
text: qsTr("GPS location service")
|
||||||
Layout.preferredWidth: gridWidth * 0.75
|
font.pointSize: subsurfaceTheme.headingPointSize
|
||||||
}
|
font.weight: Font.Light
|
||||||
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
}
|
||||||
|
|
||||||
TemplateTextField {
|
TemplateLabel {
|
||||||
id: distanceThreshold
|
text: qsTr("Distance threshold (meters)")
|
||||||
text: PrefLocationService.distance_threshold
|
Layout.preferredWidth: gridWidth * 0.75
|
||||||
Layout.preferredWidth: gridWidth * 0.25
|
}
|
||||||
onEditingFinished: {
|
|
||||||
PrefLocationService.distance_threshold = distanceThreshold.text
|
TemplateTextField {
|
||||||
|
id: distanceThreshold
|
||||||
|
text: PrefLocationService.distance_threshold
|
||||||
|
Layout.preferredWidth: gridWidth * 0.25
|
||||||
|
onEditingFinished: {
|
||||||
|
PrefLocationService.distance_threshold = distanceThreshold.text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TemplateLabel {
|
||||||
|
text: qsTr("Time threshold (minutes)")
|
||||||
|
Layout.preferredWidth: gridWidth * 0.75
|
||||||
|
}
|
||||||
|
|
||||||
|
TemplateTextField {
|
||||||
|
id: timeThreshold
|
||||||
|
text: PrefLocationService.time_threshold / 60
|
||||||
|
Layout.preferredWidth: gridWidth * 0.25
|
||||||
|
onEditingFinished: {
|
||||||
|
PrefLocationService.time_threshold = timeThreshold.text * 60
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
TemplateLine {
|
||||||
TemplateLabel {
|
visible: sectionAdvanced.isExpanded
|
||||||
text: qsTr("Time threshold (minutes)")
|
|
||||||
Layout.preferredWidth: gridWidth * 0.75
|
|
||||||
}
|
}
|
||||||
|
GridLayout {
|
||||||
|
id: filterPrefs
|
||||||
|
visible: sectionAdvanced.isExpanded
|
||||||
|
columns: 2
|
||||||
|
|
||||||
TemplateTextField {
|
TemplateLabel {
|
||||||
id: timeThreshold
|
text: qsTr("Filter preferences")
|
||||||
text: PrefLocationService.time_threshold / 60
|
font.pointSize: subsurfaceTheme.headingPointSize
|
||||||
Layout.preferredWidth: gridWidth * 0.25
|
font.weight: Font.Light
|
||||||
onEditingFinished: {
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
PrefLocationService.time_threshold = timeThreshold.text * 60
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
}
|
||||||
|
TemplateLabel {
|
||||||
|
text: qsTr("Include notes in full text filtering")
|
||||||
|
Layout.preferredWidth: gridWidth * 0.75
|
||||||
|
}
|
||||||
|
|
||||||
|
SsrfSwitch {
|
||||||
|
id: fullTextNotes
|
||||||
|
checked: PrefGeneral.filterFullTextNotes
|
||||||
|
Layout.preferredWidth: gridWidth * 0.25
|
||||||
|
onClicked: {
|
||||||
|
PrefGeneral.filterFullTextNotes = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TemplateLabel {
|
||||||
|
text: qsTr("Match filter case sensitive")
|
||||||
|
Layout.preferredWidth: gridWidth * 0.75
|
||||||
|
}
|
||||||
|
|
||||||
|
SsrfSwitch {
|
||||||
|
id: filterCaseSensitive
|
||||||
|
checked: PrefGeneral.filterCaseSensitive
|
||||||
|
Layout.preferredWidth: gridWidth * 0.25
|
||||||
|
onClicked: {
|
||||||
|
PrefGeneral.filterCaseSensitive = checked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
TemplateLine {
|
||||||
}
|
visible: sectionAdvanced.isExpanded
|
||||||
Rectangle {
|
|
||||||
color: subsurfaceTheme.darkerPrimaryColor
|
|
||||||
height: 1
|
|
||||||
opacity: 0.5
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
GridLayout {
|
|
||||||
id: filterPrefs
|
|
||||||
columns: 2
|
|
||||||
|
|
||||||
TemplateLabel {
|
|
||||||
text: qsTr("Filter preferences")
|
|
||||||
font.pointSize: subsurfaceTheme.headingPointSize
|
|
||||||
font.weight: Font.Light
|
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
||||||
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
|
||||||
Layout.columnSpan: 2
|
|
||||||
}
|
|
||||||
TemplateLabel {
|
|
||||||
text: qsTr("Include notes in full text filtering")
|
|
||||||
Layout.preferredWidth: gridWidth * 0.75
|
|
||||||
}
|
}
|
||||||
|
GridLayout {
|
||||||
|
id: whichBluetoothDevices
|
||||||
|
visible: sectionAdvanced.isExpanded
|
||||||
|
columns: 2
|
||||||
|
TemplateLabel {
|
||||||
|
text: qsTr("Bluetooth")
|
||||||
|
font.pointSize: subsurfaceTheme.headingPointSize
|
||||||
|
font.weight: Font.Light
|
||||||
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
}
|
||||||
|
|
||||||
SsrfSwitch {
|
TemplateLabel {
|
||||||
id: fullTextNotes
|
text: qsTr("Temporarily show all bluetooth devices \neven if not recognized as dive computers.\nPlease report DCs that need this setting")
|
||||||
checked: PrefGeneral.filterFullTextNotes
|
Layout.preferredWidth: gridWidth * 0.75
|
||||||
Layout.preferredWidth: gridWidth * 0.25
|
}
|
||||||
onClicked: {
|
SsrfSwitch {
|
||||||
PrefGeneral.filterFullTextNotes = checked
|
id: nonDCButton
|
||||||
|
checked: manager.showNonDiveComputers
|
||||||
|
Layout.preferredWidth: gridWidth * 0.25
|
||||||
|
onClicked: {
|
||||||
|
manager.showNonDiveComputers = checked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
TemplateLine {
|
||||||
TemplateLabel {
|
visible: sectionAdvanced.isExpanded
|
||||||
text: qsTr("Match filter case sensitive")
|
|
||||||
Layout.preferredWidth: gridWidth * 0.75
|
|
||||||
}
|
}
|
||||||
|
GridLayout {
|
||||||
|
id: developer
|
||||||
|
visible: sectionAdvanced.isExpanded
|
||||||
|
columns: 2
|
||||||
|
TemplateLabel {
|
||||||
|
text: qsTr("Developer")
|
||||||
|
font.pointSize: subsurfaceTheme.headingPointSize
|
||||||
|
font.weight: Font.Light
|
||||||
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
|
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
}
|
||||||
|
|
||||||
SsrfSwitch {
|
TemplateLabel {
|
||||||
id: filterCaseSensitive
|
text: qsTr("Display Developer menu")
|
||||||
checked: PrefGeneral.filterCaseSensitive
|
Layout.preferredWidth: gridWidth * 0.75
|
||||||
Layout.preferredWidth: gridWidth * 0.25
|
}
|
||||||
onClicked: {
|
SsrfSwitch {
|
||||||
PrefGeneral.filterCaseSensitive = checked
|
id: developerButton
|
||||||
|
checked: PrefDisplay.show_developer
|
||||||
|
Layout.preferredWidth: gridWidth * 0.25
|
||||||
|
onClicked: {
|
||||||
|
PrefDisplay.show_developer = checked
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
color: subsurfaceTheme.darkerPrimaryColor
|
|
||||||
height: 1
|
|
||||||
opacity: 0.5
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
GridLayout {
|
|
||||||
id: whichBluetoothDevices
|
|
||||||
columns: 2
|
|
||||||
TemplateLabel {
|
|
||||||
text: qsTr("Bluetooth")
|
|
||||||
font.pointSize: subsurfaceTheme.headingPointSize
|
|
||||||
font.weight: Font.Light
|
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
||||||
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
|
||||||
Layout.columnSpan: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
TemplateLabel {
|
|
||||||
text: qsTr("Temporarily show all bluetooth devices \neven if not recognized as dive computers.\nPlease report DCs that need this setting")
|
|
||||||
Layout.preferredWidth: gridWidth * 0.75
|
|
||||||
}
|
|
||||||
SsrfSwitch {
|
|
||||||
id: nonDCButton
|
|
||||||
checked: manager.showNonDiveComputers
|
|
||||||
Layout.preferredWidth: gridWidth * 0.25
|
|
||||||
onClicked: {
|
|
||||||
manager.showNonDiveComputers = checked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
color: subsurfaceTheme.darkerPrimaryColor
|
|
||||||
height: 1
|
|
||||||
opacity: 0.5
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
GridLayout {
|
|
||||||
id: developer
|
|
||||||
columns: 2
|
|
||||||
TemplateLabel {
|
|
||||||
text: qsTr("Developer")
|
|
||||||
font.pointSize: subsurfaceTheme.headingPointSize
|
|
||||||
font.weight: Font.Light
|
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
||||||
Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
|
|
||||||
Layout.columnSpan: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
TemplateLabel {
|
|
||||||
text: qsTr("Display Developer menu")
|
|
||||||
Layout.preferredWidth: gridWidth * 0.75
|
|
||||||
}
|
|
||||||
SsrfSwitch {
|
|
||||||
id: developerButton
|
|
||||||
checked: PrefDisplay.show_developer
|
|
||||||
Layout.preferredWidth: gridWidth * 0.25
|
|
||||||
onClicked: {
|
|
||||||
PrefDisplay.show_developer = checked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
height: Kirigami.Units.gridUnit * 6
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue