diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-30 20:39:25 -0500 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-30 20:39:25 -0500 |
commit | 6a3e761d8faf5be3bdc8a5feb8f06b69f9bdeaaf (patch) | |
tree | 08b6133f3bd55654d7dcafbe67bc235dfe997760 /qt-mobile/qml/DiveList.qml | |
parent | 1cf1fa9cacc24853e3c31419e8640dbd9d025bfb (diff) | |
download | subsurface-6a3e761d8faf5be3bdc8a5feb8f06b69f9bdeaaf.tar.gz |
QML UI: scroll to top of dive list when tapping title bar
This helps you get to the latest dive when you are stuck at the bottom
of a dive list.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/DiveList.qml')
-rw-r--r-- | qt-mobile/qml/DiveList.qml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index b3b82bc27..b80c1ec03 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -14,6 +14,11 @@ MobileComponents.Page { property int credentialStatus: manager.credentialStatus property int numDives: diveListView.count property color textColor: subsurfaceTheme.diveListTextColor + + function scrollToTop() { + diveListView.positionViewAtBeginning() + } + Component { id: diveDelegate MobileComponents.ListItem { |