aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-09-26 14:57:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-26 08:38:53 -0700
commit97031da0d8a69ee107978acec07e56b1bf2b7843 (patch)
treea40c6c4e6cc9f02b366fdf8c70274bdbc8c4aed8
parent8ab8a67f818952b7f720276160c25847bad93480 (diff)
downloadsubsurface-97031da0d8a69ee107978acec07e56b1bf2b7843.tar.gz
mobile, QML UI: margings and paddings in download screen
There was a significant of not needed whitespace on the download from DC page. Most importantly, the bottom buttons where not on the bottom, so we had to truncate the downloaded dives early (to prevent overflowing the buttons). Further, a tiny bit of padding is removed between the 3 top pull down items. All this, results in the diplay of more dives without scrolling. For example, previously, only 1 dive (with 1 stored DC) was shown on my 5.5" device, and now 3 (scale: regular). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml16
1 files changed, 9 insertions, 7 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index 74cb64195..a359cd3c0 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -9,10 +9,10 @@ import org.kde.kirigami 2.2 as Kirigami
Kirigami.Page {
id: diveComputerDownloadWindow
- anchors.top:parent.top
- width: parent.width
- height: parent.height
- Layout.fillWidth: true;
+ leftPadding: Kirigami.Units.gridUnit / 2
+ rightPadding: Kirigami.Units.gridUnit / 2
+ topPadding: 0
+ bottomPadding: 0
title: qsTr("Dive Computer")
background: Rectangle { color: subsurfaceTheme.backgroundColor }
@@ -49,12 +49,12 @@ Kirigami.Page {
anchors.top: parent.top
height: parent.height
width: parent.width
- Layout.fillWidth: true
GridLayout {
id: buttonGrid
Layout.alignment: Qt.AlignTop
Layout.topMargin: Kirigami.Units.smallSpacing * 4
columns: 2
+ rowSpacing: 0
Controls.Label {
text: qsTr(" Vendor name: ")
font.pointSize: subsurfaceTheme.regularPointSize
@@ -313,7 +313,7 @@ Kirigami.Page {
ListView {
id: dlList
Layout.topMargin: Kirigami.Units.smallSpacing * 4
- Layout.bottomMargin: bottomButtons.height * 1.5
+ Layout.bottomMargin: bottomButtons.height / 2
Layout.fillWidth: true
Layout.fillHeight: true
@@ -334,7 +334,6 @@ Kirigami.Page {
RowLayout {
id: bottomButtons
- Layout.fillWidth: true
Controls.Label {
text: "" // Spacer on the left for hamburger menu
Layout.fillWidth: true
@@ -343,6 +342,7 @@ Kirigami.Page {
id: acceptButton
enabled: divesDownloaded
text: qsTr("Accept")
+ bottomPadding: Kirigami.Units.gridUnit / 2
onClicked: {
manager.appendTextToLog("Save downloaded dives that were selected")
importModel.recordDives()
@@ -362,6 +362,7 @@ Kirigami.Page {
id: select
enabled: divesDownloaded
text: qsTr("Select All")
+ bottomPadding: Kirigami.Units.gridUnit / 2
onClicked : {
importModel.selectAll()
}
@@ -370,6 +371,7 @@ Kirigami.Page {
id: unselect
enabled: divesDownloaded
text: qsTr("Unselect All")
+ bottomPadding: Kirigami.Units.gridUnit / 2
onClicked : {
importModel.selectNone()
}