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>
This commit is contained in:
Jan Mulder 2018-09-26 14:57:12 +02:00 committed by Dirk Hohndel
parent 8ab8a67f81
commit 97031da0d8

View file

@ -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()
}