QML UI: correct trip separator line

Partially cosmetic and partially a bug fix. 1) the seperator line
between trips and dives that are not in a trip was drawn in the
background color => the line was invisible. 2) When looking very
closely, there was a 1-2 pixel wide error between the seperator line
between trips and dives that are not in a trip. 3) there was a comment
that the trip separator needed to be extra thick. IMHO, this
looks ugly, and is superfluous as there is a nice sidebar along
the dives that belong to the trip. Finally, the line shall not
be displayed when not in a trip.

So, basically, the line (the QML rectangle) is completely rewritten,
to take care of all issues. There is 1 hack: the line color is
taken from the dive separator line. But its fully unclear to me
where that color is defined in Qt/QML or Kirigami, so I hardcoded
the proper color. That just works.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2018-09-30 16:07:30 +02:00 committed by Dirk Hohndel
parent 40a65a2e6b
commit c6a4250a58

View file

@ -318,14 +318,10 @@ Kirigami.ScrollablePage {
}
}
Rectangle {
height: Math.max(2, Kirigami.Units.gridUnit / 12) // we want a thicker line
anchors {
bottom: headingBackground.top
left: parent.left
rightMargin: Kirigami.Units.gridUnit * -2
right: parent.right
}
color: subsurfaceTheme.lightPrimaryColor
height: section == "" ? 0 : 1
width: parent.width
anchors.top: headingBackground.bottom
color: "#B2B2B2"
}
}
}