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>
This commit is contained in:
Dirk Hohndel 2016-01-01 16:34:12 -08:00
parent fd23a4891c
commit 87fc84a5ee

View file

@ -37,4 +37,16 @@ MobileComponents.Page {
}
}
}
contextualActions: [
Action {
id: closeLog
text: "Close log"
iconName: "view-readermode"
onTriggered: {
stackView.pop()
contextDrawer.close()
}
}
]
}