summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/Log.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-01 16:34:12 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-01 16:34:12 -0800
commit87fc84a5eee6f6dbdfc2269b7ddf27324473d94e (patch)
treed854fa40e2f63baddfd44482a5bcd9dc276c4f1d /qt-mobile/qml/Log.qml
parentfd23a4891c196c73423d68f6743aa1e5dde72a28 (diff)
downloadsubsurface-87fc84a5eee6f6dbdfc2269b7ddf27324473d94e.tar.gz
QML UI: allow the user to close the Log
Same context menu idea. The reason for adding this is that the context menu always acts on the last page in the stack (so I guess the "right-most-one"). So if you edit a dive and then open the log, you can't save the dive until the dive edit is the last page which means you have to close the log, first. Not ideal, but better than nothing and it works well enough. I still think we might want to go back to a traditional "Save" button... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/Log.qml')
-rw-r--r--qt-mobile/qml/Log.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/qt-mobile/qml/Log.qml b/qt-mobile/qml/Log.qml
index c6214f8e3..f77bf2fa9 100644
--- a/qt-mobile/qml/Log.qml
+++ b/qt-mobile/qml/Log.qml
@@ -37,4 +37,16 @@ MobileComponents.Page {
}
}
}
+ contextualActions: [
+ Action {
+ id: closeLog
+ text: "Close log"
+ iconName: "view-readermode"
+ onTriggered: {
+ stackView.pop()
+ contextDrawer.close()
+ }
+ }
+ ]
+
}