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 { @@ -69,6 +75,24 @@ 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 +158,7 @@ delegate: Flickable { id: flick property alias currentImageSource: image.source + property alias image: image width: imageWidth height: imageHeight contentWidth: imageWidth