Skip to content

Commit

Permalink
QML-UI: Download screen fixup
Browse files Browse the repository at this point in the history
Again, mostly related to label change. First, the top button was "glued"
to the top of the screen, so added a little margin there. It
appeared that all the other items on the screen (progressbar,
2 button rows, and the downloaded dive list) where not moving down
due to the add of that little top margin. This was solved by
anchor-ing the items together. Finally, the text of a downloaded
dive was on the top of the delegate lines. Not sure where that came
from, but easily solved by centering it explicitly.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
  • Loading branch information
janmulder authored and dirkhh committed Oct 19, 2017
1 parent 53ed1c7 commit a9b692f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 21 additions & 3 deletions mobile-widgets/qml/DownloadFromDiveComputer.qml
Expand Up @@ -59,6 +59,11 @@ Kirigami.Page {
width: parent.width
Layout.fillWidth: true
GridLayout {
id: buttonGrid
anchors {
top: parent.top
topMargin: Kirigami.Units.smallSpacing * 4
}
columns: 2
Controls.Label { text: qsTr(" Vendor name: ") }
property var vendoridx: downloadThread.data().getDetectedVendorIndex()
Expand Down Expand Up @@ -163,16 +168,24 @@ Kirigami.Page {
}

Controls.ProgressBar {
anchors {
top: buttonGrid.bottom
topMargin: Kirigami.Units.smallSpacing * 4
}
id: progressBar
Layout.fillWidth: true
indeterminate: true
visible: false
}

RowLayout {
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: Kirigami.Units.smallSpacing
id: buttonBar
anchors {
left: parent.left
right: parent.right
top: progressBar.bottom
topMargin: Kirigami.Units.smallSpacing * 2
}
spacing: Kirigami.Units.smallSpacing
SsrfButton {
id: download
Expand Down Expand Up @@ -206,6 +219,11 @@ Kirigami.Page {
}

ListView {
id: dlList
anchors {
top: buttonBar.bottom
topMargin: Kirigami.Units.smallSpacing * 4
}
Layout.fillWidth: true
Layout.fillHeight: true

Expand Down
2 changes: 2 additions & 0 deletions mobile-widgets/qml/DownloadedDiveDelegate.qml
Expand Up @@ -48,12 +48,14 @@ Kirigami.AbstractListItem {
Controls.Label {
id: dateLabel
text: innerListItem.datetime
anchors.verticalCenter: parent.verticalCenter
width: Math.round(parent.width * 0.35)
font.pointSize: subsurfaceTheme.smallPointSize
color: textColor
}
Controls.Label {
text: innerListItem.depth + ' / ' + innerListItem.duration
anchors.verticalCenter: parent.verticalCenter
width: Math.round(parent.width * 0.35)
font.pointSize: subsurfaceTheme.smallPointSize
color: textColor
Expand Down

0 comments on commit a9b692f

Please sign in to comment.