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>
This commit is contained in:
jan Iversen 2020-01-15 19:36:38 +01:00 committed by Dirk Hohndel
parent 3d239a7903
commit ba7a8f68bc

View file

@ -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 = ""
}
}
}
} }
@ -365,41 +397,6 @@ Kirigami.ScrollablePage {
Layout.fillWidth: true Layout.fillWidth: true
} }
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 { GridLayout {
id: unit_system id: unit_system
columns: 2 columns: 2