aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-15 19:36:38 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-19 11:54:54 -0800
commitba7a8f68bc4e3ddf42a1ff272dc369a4138229fb (patch)
tree3f1ea7d7305d0e94297f10cfc801f1d920846d52
parent3d239a79035e88b4b4a3d80e4e0f1ddc86fd6d9d (diff)
downloadsubsurface-ba7a8f68bc4e3ddf42a1ff272dc369a4138229fb.tar.gz
mobile-widgets/qml: move dive computers to general section.
move gridlayout divecomputers to TemplateSection general, without changing anything (apart from adding a visible: attribute and replacing the Rectangle used to draw a line at the bottom with a TemplateLine on top. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qml/Settings.qml67
1 files changed, 32 insertions, 35 deletions
diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml
index 0f97df880..aff9503b9 100644
--- a/mobile-widgets/qml/Settings.qml
+++ b/mobile-widgets/qml/Settings.qml
@@ -98,6 +98,38 @@ Kirigami.ScrollablePage {
}
}
}
+ TemplateLine {
+ visible: sectionGeneral.isExpanded
+ }
+ GridLayout {
+ id: divecomputers
+ visible: sectionGeneral.isExpanded
+ columns: 2
+ TemplateLabel {
+ text: qsTr("Dive computers")
+ font.pointSize: subsurfaceTheme.headingPointSize
+ font.weight: Font.Light
+ Layout.topMargin: Kirigami.Units.largeSpacing
+ Layout.bottomMargin: Kirigami.Units.largeSpacing
+ Layout.columnSpan: 2
+ }
+ TemplateLabel {
+ text: qsTr("Forget remembered dive computers")
+ Layout.preferredWidth: gridWidth * 0.75
+ }
+ SsrfButton {
+ id: forgetDCButton
+ text: qsTr("Forget")
+ enabled: PrefDiveComputer.vendor1 !== ""
+ onClicked: {
+ PrefDiveComputer.vendor1 = PrefDiveComputer.product1 = PrefDiveComputer.device1 = ""
+ PrefDiveComputer.vendor2 = PrefDiveComputer.product2 = PrefDiveComputer.device2 = ""
+ PrefDiveComputer.vendor3 = PrefDiveComputer.product3 = PrefDiveComputer.device3 = ""
+ PrefDiveComputer.vendor4 = PrefDiveComputer.product4 = PrefDiveComputer.device4 = ""
+ PrefDiveComputer.vendor = PrefDiveComputer.product = PrefDiveComputer.device = ""
+ }
+ }
+ }
}
@@ -366,41 +398,6 @@ Kirigami.ScrollablePage {
}
GridLayout {
- id: divecomputers
- columns: 2
- TemplateLabel {
- text: qsTr("Dive computers")
- font.pointSize: subsurfaceTheme.headingPointSize
- font.weight: Font.Light
- Layout.topMargin: Kirigami.Units.largeSpacing
- Layout.bottomMargin: Kirigami.Units.largeSpacing
- Layout.columnSpan: 2
- }
- TemplateLabel {
- text: qsTr("Forget remembered dive computers")
- Layout.preferredWidth: gridWidth * 0.75
- }
- SsrfButton {
- id: forgetDCButton
- text: qsTr("Forget")
- enabled: PrefDiveComputer.vendor1 !== ""
- onClicked: {
- PrefDiveComputer.vendor1 = PrefDiveComputer.product1 = PrefDiveComputer.device1 = ""
- PrefDiveComputer.vendor2 = PrefDiveComputer.product2 = PrefDiveComputer.device2 = ""
- PrefDiveComputer.vendor3 = PrefDiveComputer.product3 = PrefDiveComputer.device3 = ""
- PrefDiveComputer.vendor4 = PrefDiveComputer.product4 = PrefDiveComputer.device4 = ""
- PrefDiveComputer.vendor = PrefDiveComputer.product = PrefDiveComputer.device = ""
- }
- }
- }
-
- Rectangle {
- color: subsurfaceTheme.darkerPrimaryColor
- height: 1
- opacity: 0.5
- Layout.fillWidth: true
- }
- GridLayout {
id: unit_system
columns: 2
TemplateLabel {