aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-06-20 09:13:12 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-06-20 09:13:12 -0700
commita93e3b26d61498ef5fd8b6818ace0937918bab86 (patch)
treea2f0498684482ceadd626d9957a501df1805fe6c /mobile-widgets/qml
parenta6a9eaa998cd33bd8c08e8fe9fa78849e66d45e3 (diff)
downloadsubsurface-a93e3b26d61498ef5fd8b6818ace0937918bab86.tar.gz
QML UI: DiveList: show left bar on dives that are part of a trip
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/DiveList.qml22
1 files changed, 13 insertions, 9 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index 857a84c35..1c45906d6 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -22,6 +22,8 @@ Kirigami.ScrollablePage {
Component {
id: diveDelegate
Kirigami.AbstractListItem {
+ leftPadding: 0
+ topPadding: 0
id: innerListItem
enabled: true
supportsMouseEvents: true
@@ -47,19 +49,22 @@ Kirigami.ScrollablePage {
deleteButtonVisible = true
timer.restart()
}
-
- Row {
- width: parent.width
- spacing: horizontalPadding
- add: Transition {
- NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 400 }
- NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 400 }
+ Item {
+ Rectangle {
+ id: leftBarDive
+ height: diveListEntry.height + Kirigami.Units.smallSpacing
+ width: dive.tripMeta == "" ? 0 : Kirigami.Units.gridUnit * 1
+ color: subsurfaceTheme.accentColor
+ anchors {
+ left: parent.left
+ top: parent.top
+ }
}
Item {
id: diveListEntry
width: parent.width - Kirigami.Units.gridUnit * (innerListItem.deleteButtonVisible ? 3 : 1)
height: childrenRect.height - Kirigami.Units.smallSpacing
-
+ anchors.left: leftBarDive.right
Kirigami.Label {
id: locationText
text: dive.location
@@ -71,7 +76,6 @@ Kirigami.ScrollablePage {
left: parent.left
leftMargin: horizontalPadding
top: parent.top
- topMargin: - Kirigami.Units.smallSpacing * 2
right: parent.right
}
}