QML UI: DiveDetailsView: move profile into bottom layout

Then we can remove the main layout and create a similar look as we now have
in the dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-06-20 11:55:05 -07:00
parent d941384fb6
commit 4f34513277

View file

@ -91,6 +91,18 @@ Item {
text: dive.duration
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
}
GridLayout {
id: bottomLayout
anchors {
top: mainLayout.bottom
left: parent.left
right: parent.right
margins: Math.round(Kirigami.Units.gridUnit / 2)
topMargin: Kirigami.Units.gridUnit * 2
}
columns: 3
rowSpacing: Kirigami.Units.smallSpacing * 2
columnSpacing: Kirigami.Units.smallSpacing
QMLProfile {
id: qmlProfile
@ -98,7 +110,7 @@ Item {
Layout.fillWidth: true
Layout.preferredHeight: Layout.minimumHeight
Layout.minimumHeight: width * 0.75
Layout.columnSpan: 4
Layout.columnSpan: 3
clip: false
Rectangle {
color: "transparent"
@ -112,24 +124,11 @@ Item {
id: noProfile
visible: dive.noDive
Layout.fillWidth: true
Layout.columnSpan: 4
Layout.columnSpan: 3
Layout.margins: Kirigami.Units.gridUnit
horizontalAlignment: Text.AlignHCenter
text: qsTr("No profile to show")
}
}
GridLayout {
id: bottomLayout
anchors {
top: mainLayout.bottom
left: parent.left
right: parent.right
margins: Math.round(Kirigami.Units.gridUnit / 2)
}
columns: 3
rowSpacing: Kirigami.Units.smallSpacing * 2
columnSpacing: Kirigami.Units.smallSpacing
Kirigami.Heading {
Layout.fillWidth: true
level: 3