From 28bf078ff7da221d4172fa64ad20c0a57218eaba Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 11 Jan 2020 15:27:53 -0800 Subject: mobile UI: add context menu to DiveDetails The undo and redo action actually work already. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveDetails.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mobile-widgets/qml/DiveDetails.qml') diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index a886a2c50..2a20271ef 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -193,6 +193,20 @@ Kirigami.Page { } } + contextualActions: [ + Kirigami.Action { + text: qsTr("Undo") + " " + manager.undoText + enabled: manager.undoText !== "" + onTriggered: manager.undo() + }, + Kirigami.Action { + text: qsTr("Redo") + " " + manager.redoText + enabled: manager.redoText !== "" + onTriggered: manager.redo() + } + ] + + onBackRequested: { if (state === "edit") { endEditMode() -- cgit v1.2.3-70-g09d2