mobile-widgets/qml: move default cylinder to general section.

move gridlayout defaultCylinder to TemplateSection general, without changing
anything (apart from adding a visible: attribute and replacing the Rectangle
used to draw a line at the end with a TemplateLine at the 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:34:13 +01:00 committed by Dirk Hohndel
parent bf7464788e
commit 3d239a7903

View file

@ -68,6 +68,36 @@ Kirigami.ScrollablePage {
Layout.preferredHeight: Kirigami.Units.gridUnit * 1.5
}
}
TemplateLine {
visible: sectionGeneral.isExpanded
}
GridLayout {
id: defaultCylinder
visible: sectionGeneral.isExpanded
columns: 2
Layout.rightMargin: Kirigami.Units.gridUnit * 1.5
TemplateLabel {
text: qsTr("Default Cylinder")
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("Cylinder:")
}
TemplateComboBox {
id: defaultCylinderBox
Layout.preferredHeight: fontMetrics.height * 2.5
inputMethodHints: Qt.ImhNoPredictiveText
Layout.fillWidth: true
onActivated: {
PrefEquipment.default_cylinder = defaultCylinderBox.currentText
}
}
}
}
@ -335,39 +365,6 @@ Kirigami.ScrollablePage {
Layout.fillWidth: true
}
GridLayout {
id: defaultCylinder
columns: 2
Layout.rightMargin: Kirigami.Units.gridUnit * 1.5
TemplateLabel {
text: qsTr("Default Cylinder")
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("Cylinder:")
}
TemplateComboBox {
id: defaultCylinderBox
Layout.preferredHeight: fontMetrics.height * 2.5
inputMethodHints: Qt.ImhNoPredictiveText
Layout.fillWidth: true
onActivated: {
PrefEquipment.default_cylinder = defaultCylinderBox.currentText
}
}
}
Rectangle {
color: subsurfaceTheme.darkerPrimaryColor
height: 1
opacity: 0.5
Layout.fillWidth: true
}
GridLayout {
id: divecomputers
columns: 2