diff options
author | Sebastian Kügler <sebas@kde.org> | 2015-12-04 03:32:52 +0100 |
---|---|---|
committer | Sebastian Kügler <sebas@kde.org> | 2015-12-07 18:46:57 +0100 |
commit | 49eb7d841da908f762d4e44ccfcd100648a11866 (patch) | |
tree | d44ef596a75139016977160908f1768787a0f36a /qt-mobile/qml/DiveDetails.qml | |
parent | 8cf47257424763c9eeb2a94fbc99dad36e36d937 (diff) | |
download | subsurface-49eb7d841da908f762d4e44ccfcd100648a11866.tar.gz |
add a contextdrawer
This item can be dragged in from the right hand side and provides
contextual actions for a page. It will be used in the dive details edit.
If there are actions, the floating button on the bottom shows an arrow
indicating that one can drag it in from the right hand side to the left.
Also clean up a bit of a noisy print that's not needed anymore.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Diffstat (limited to 'qt-mobile/qml/DiveDetails.qml')
-rw-r--r-- | qt-mobile/qml/DiveDetails.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml index 28646fd89..f60d39acb 100644 --- a/qt-mobile/qml/DiveDetails.qml +++ b/qt-mobile/qml/DiveDetails.qml @@ -43,6 +43,26 @@ MobileComponents.Page { } ] + contextualActions: [ + Action { + text: "Save Changes" + enabled: diveDetailsWindow.state == "edit" + iconName: "document-save" + onTriggered: { + manager.saveChanges(); + } + }, + Action { + text: checked ? "View" : "Edit" + checkable: true + iconName: checked ? "view-readermode" : "document-edit" + onTriggered: { + diveDetailsWindow.state = checked ? "edit" : "view" + } + } + + ] + ScrollView { anchors.fill: parent Flickable { |