From c6a4250a58f26419d72df8bf9d5e0807bb813721 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Sun, 30 Sep 2018 16:07:30 +0200 Subject: 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 --- mobile-widgets/qml/DiveList.qml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 1acc3970c..5c1633a2b 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -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" } } } -- cgit v1.2.3-70-g09d2