From 48362ae11a175ce64518e1203b893b0d401fec5a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 1 Apr 2016 22:31:33 -0500 Subject: QML UI: when on the dive list, action button now offers add dive This seems like a useful default action when people are looking at the dive list (and it's a request from a user to have this as a button instead of just via the menu). Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DiveList.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index 042376c37..d7fb5fdca 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -171,7 +171,7 @@ Kirigami.ScrollablePage { if (visible) { page.mainAction = page.saveAction } else { - page.mainAction = null + page.mainAction = page.addDiveAction } } @@ -215,6 +215,12 @@ Kirigami.ScrollablePage { } } + property QtObject addDiveAction: Action { + iconName: "list-add" + onTriggered: { + startAddDive() + } + } property QtObject saveAction: Action { iconName: "document-save" -- cgit v1.2.3-70-g09d2