diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-04-14 21:04:56 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-14 21:04:56 -0700 |
commit | 8508fa5be810afc313e6f10f3fa5e3bec0108d08 (patch) | |
tree | 44dc6cee719fd11cf4c83dfa0d50945c92ebcf83 /mobile-widgets | |
parent | cc319ad8b110beff1e53d1df020bdd153bcadcde (diff) | |
download | subsurface-8508fa5be810afc313e6f10f3fa5e3bec0108d08.tar.gz |
QML UI: always show dives that aren't in a trip
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index b120ef4d7..ed2bb674f 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -49,8 +49,8 @@ Kirigami.ScrollablePage { supportsMouseEvents: true checked: diveListView.currentIndex === model.index width: parent.width - height: 0 - visible: false + height: dive.tripNrDives == 0 ? diveListEntry.height + Kirigami.Units.smallSpacing : 0 + visible: dive.tripNrDives == 0 backgroundColor: checked ? subsurfaceTheme.primaryColor : subsurfaceTheme.backgroundColor activeBackgroundColor: subsurfaceTheme.primaryColor textColor: checked ? subsurfaceTheme.primaryTextColor : subsurfaceTheme.textColor @@ -60,7 +60,7 @@ Kirigami.ScrollablePage { states: [ State { name: "isHidden"; - when: dive.tripMeta !== activeTrip + when: dive.tripMeta !== activeTrip && dive.tripNrDives != 0 PropertyChanges { target: innerListItem height: 0 @@ -69,7 +69,7 @@ Kirigami.ScrollablePage { }, State { name: "isVisible"; - when: dive.tripMeta === activeTrip + when: dive.tripMeta === activeTrip || dive.tripNrDives == 0 PropertyChanges { target: innerListItem height: diveListEntry.height + Kirigami.Units.smallSpacing |