From e22943fa21027917cd8d2de98cd13ae7d12d751a Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Wed, 22 Jan 2020 12:54:18 +0100 Subject: [PATCH] mobile-widgets/qml: use Kirigami Units instead of hardcoded values This allows for better scaling of the UI. Signed-off-by: jan Iversen Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DivePlannerEdit.qml | 2 +- mobile-widgets/qml/DivePlannerManager.qml | 2 +- mobile-widgets/qml/DivePlannerSetup.qml | 14 +++++++------- mobile-widgets/qml/DivePlannerView.qml | 2 +- mobile-widgets/qml/Export.qml | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mobile-widgets/qml/DivePlannerEdit.qml b/mobile-widgets/qml/DivePlannerEdit.qml index 667c2df3b..fa5e245f0 100644 --- a/mobile-widgets/qml/DivePlannerEdit.qml +++ b/mobile-widgets/qml/DivePlannerEdit.qml @@ -13,7 +13,7 @@ Kirigami.ScrollablePage { ColumnLayout { width: parent.width spacing: 1 - Layout.margins: 10 + Layout.margins: Kirigami.Units.gridUnit Text { text: "Dive planner edit" diff --git a/mobile-widgets/qml/DivePlannerManager.qml b/mobile-widgets/qml/DivePlannerManager.qml index 796272502..c78c1c957 100644 --- a/mobile-widgets/qml/DivePlannerManager.qml +++ b/mobile-widgets/qml/DivePlannerManager.qml @@ -13,7 +13,7 @@ Kirigami.ScrollablePage { ColumnLayout { width: parent.width spacing: 1 - Layout.margins: 10 + Layout.margins: Kirigami.Units.gridUnit Text { text: "Dive planner manager" diff --git a/mobile-widgets/qml/DivePlannerSetup.qml b/mobile-widgets/qml/DivePlannerSetup.qml index aa715f03a..ec1e14ca4 100644 --- a/mobile-widgets/qml/DivePlannerSetup.qml +++ b/mobile-widgets/qml/DivePlannerSetup.qml @@ -24,7 +24,7 @@ Kirigami.ScrollablePage { Column { width: parent.width spacing: 1 - Layout.margins: 10 + Layout.margins: Kirigami.Units.gridUnit TemplateSection { id: rates @@ -32,8 +32,8 @@ Kirigami.ScrollablePage { GridLayout { columns: 2 - rowSpacing: 10 - columnSpacing: 20 + rowSpacing: Kirigami.Units.smallSpacing * 2 + columnSpacing: Kirigami.Units.smallSpacing visible: rates.isExpanded TemplateLabel { @@ -134,8 +134,8 @@ Kirigami.ScrollablePage { GridLayout { columns: 2 - rowSpacing: 10 - columnSpacing: 20 + rowSpacing: Kirigami.Units.smallSpacing * 2 + columnSpacing: Kirigami.Units.smallSpacing visible: planning.isExpanded // Only support "Open circuit" @@ -204,8 +204,8 @@ Kirigami.ScrollablePage { GridLayout { columns: 2 - rowSpacing: 10 - columnSpacing: 20 + rowSpacing: Kirigami.Units.smallSpacing * 2 + columnSpacing: Kirigami.Units.smallSpacing visible: gasoptions.isExpanded TemplateLabel { diff --git a/mobile-widgets/qml/DivePlannerView.qml b/mobile-widgets/qml/DivePlannerView.qml index 1258c8497..b777a9e75 100644 --- a/mobile-widgets/qml/DivePlannerView.qml +++ b/mobile-widgets/qml/DivePlannerView.qml @@ -13,7 +13,7 @@ Kirigami.ScrollablePage { ColumnLayout { width: parent.width spacing: 1 - Layout.margins: 10 + Layout.margins: Kirigami.Units.gridUnit Text { text: "Dive planner view" diff --git a/mobile-widgets/qml/Export.qml b/mobile-widgets/qml/Export.qml index 097893b60..5ef4c4ce7 100644 --- a/mobile-widgets/qml/Export.qml +++ b/mobile-widgets/qml/Export.qml @@ -34,8 +34,8 @@ Kirigami.ScrollablePage { standardButtons: StandardButton.Apply | StandardButton.Cancel GridLayout { - rowSpacing: 10 - columnSpacing: 10 + rowSpacing: Kirigami.Units.smallSpacing * 2 + columnSpacing: Kirigami.Units.smallSpacing columns: 2 Text {