QML UI: re-indent DiveList code

No actual changes besides whitespace.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-06-20 07:48:10 -07:00
parent e49301ea21
commit 684354ab6e

View file

@ -162,32 +162,32 @@ Kirigami.ScrollablePage {
rightMargin: Kirigami.Units.gridUnit * -2 rightMargin: Kirigami.Units.gridUnit * -2
} }
color: subsurfaceTheme.darkBackgroundColor color: subsurfaceTheme.darkBackgroundColor
Kirigami.Label { Kirigami.Label {
id: sectionText id: sectionText
text: { text: {
// if the tripMeta (which we get as "section") ends in ::-- we know // if the tripMeta (which we get as "section") ends in ::-- we know
// that there's no trip -- otherwise strip the meta information before // that there's no trip -- otherwise strip the meta information before
// the :: and show the trip location // the :: and show the trip location
var shownText var shownText
var endsWithDoubleDash = /::--$/; var endsWithDoubleDash = /::--$/;
if (endsWithDoubleDash.test(section) || section === "--") { if (endsWithDoubleDash.test(section) || section === "--") {
shownText = "" shownText = ""
} else { } else {
shownText = section.replace(/.*::/, "") shownText = section.replace(/.*::/, "")
}
shownText
} }
shownText visible: text !== ""
font.weight: Font.Bold
anchors {
top: parent.top
left: parent.left
topMargin: Math.max(2, Kirigami.Units.gridUnit / 2)
leftMargin: Kirigami.Units.gridUnit / 2
right: parent.right
}
color: textColor
} }
visible: text !== ""
font.weight: Font.Bold
anchors {
top: parent.top
left: parent.left
topMargin: Math.max(2, Kirigami.Units.gridUnit / 2)
leftMargin: Kirigami.Units.gridUnit / 2
right: parent.right
}
color: textColor
}
} }
Rectangle { Rectangle {
height: Math.max(2, Kirigami.Units.gridUnit / 12) // we want a thicker line height: Math.max(2, Kirigami.Units.gridUnit / 12) // we want a thicker line