From 3d239a79035e88b4b4a3d80e4e0f1ddc86fd6d9d Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Wed, 15 Jan 2020 19:34:13 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/Settings.qml | 63 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 33 deletions(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml index b8f6b02bc..0f97df880 100644 --- a/mobile-widgets/qml/Settings.qml +++ b/mobile-widgets/qml/Settings.qml @@ -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 -- cgit v1.2.3-70-g09d2