diff --git a/qmlUiKirigami/ImageViewer.qml b/qmlUiKirigami/ImageViewer.qml --- a/qmlUiKirigami/ImageViewer.qml +++ b/qmlUiKirigami/ImageViewer.qml @@ -44,6 +44,12 @@ KQA.MimeDatabase { id: mimeDB } + + Kirigami.ContextDrawer { + id: contextDrawer + title: i18n("Edit image") + handleVisible: true + } actions { left: Kirigami.Action { @@ -64,11 +70,24 @@ } } } - right: Kirigami.Action { - id: editAction - iconName: "editimage" - tooltip: i18n("Edit Image") - } + contextualActions: [ + Kirigami.Action { + iconName: "image-rotate-left-symbolic" + text: i18n("Rotate left") + tooltip: i18n("Rotate the image to the left") + onTriggered: { + listView.currentItem.image.rotation -= 90 + } + }, + Kirigami.Action { + iconName: "image-rotate-right-symbolic" + text: i18n("Rotate right") + tooltip: i18n("Rotate the image to the right") + onTriggered: { + listView.currentItem.image.rotation += 90 + } + } + ] } //FIXME: HACK @@ -134,6 +153,7 @@ delegate: Flickable { id: flick property alias currentImageSource: image.source + property alias image: image width: imageWidth height: imageHeight contentWidth: imageWidth