QML UI: repair long trip headers

Trip headers spanning more than one line where broken at incorrect
locations in the string. Not exactly sure, but I think this came with
the newest Kirigami SHA, and especially the Label change.

Carefully reading the code for the trip heading shows a "strange"
negative margin. So the margin is on the outside. This margin was
used to split the string, allowing for a small invisible part of
the string to present as trip header.

This is solved by this commit.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-10-27 10:57:55 +02:00
parent 43a5cb3962
commit f25cc3a67f

View file

@ -185,7 +185,7 @@ Kirigami.ScrollablePage {
Component {
id: tripHeading
Item {
width: page.width - Kirigami.Units.gridUnit
width: page.width
height: childrenRect.height - Kirigami.Units.smallSpacing
Rectangle {
id: headingBackground
@ -193,7 +193,6 @@ Kirigami.ScrollablePage {
anchors {
left: parent.left
right: parent.right
rightMargin: Kirigami.Units.gridUnit * -2
}
color: subsurfaceTheme.lightPrimaryColor
visible: section != ""