QML UI: turn DiveList heading into label

This way it will render in the same font as the location of a dive.
This will look like crap until the next commit adds a rectangle with
color around it, but this way it's much easier to see the individual
changes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-06-20 07:42:56 -07:00
parent 3d707dca9a
commit 3d8f61fe6c

View file

@ -153,8 +153,7 @@ Kirigami.ScrollablePage {
Item { Item {
width: page.width - Kirigami.Units.gridUnit width: page.width - Kirigami.Units.gridUnit
height: childrenRect.height + Kirigami.Units.smallSpacing * 2 + Math.max(2, Kirigami.Units.gridUnit / 2) height: childrenRect.height + Kirigami.Units.smallSpacing * 2 + Math.max(2, Kirigami.Units.gridUnit / 2)
Kirigami.Label {
Kirigami.Heading {
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
@ -170,6 +169,7 @@ Kirigami.ScrollablePage {
shownText shownText
} }
visible: text !== "" visible: text !== ""
font.weight: Font.Bold
anchors { anchors {
top: parent.top top: parent.top
left: parent.left left: parent.left
@ -178,7 +178,6 @@ Kirigami.ScrollablePage {
right: parent.right right: parent.right
} }
color: textColor color: textColor
level: 3
} }
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