From 87fc84a5eee6f6dbdfc2269b7ddf27324473d94e Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 1 Jan 2016 16:34:12 -0800 Subject: 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 --- qt-mobile/qml/Log.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'qt-mobile/qml/Log.qml') 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() + } + } + ] + } -- cgit v1.2.3-70-g09d2