summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-09-30 16:07:30 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-30 08:16:52 -0700
commitc6a4250a58f26419d72df8bf9d5e0807bb813721 (patch)
tree09435f2da7806a5802dfad801b4931d5e3e69608
parent40a65a2e6b4a68cac5ea6cf1a254021b637bad35 (diff)
downloadsubsurface-c6a4250a58f26419d72df8bf9d5e0807bb813721.tar.gz
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>
-rw-r--r--mobile-widgets/qml/DiveList.qml12
1 files changed, 4 insertions, 8 deletions
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"
}
}
}