Toggle "Image only" mode on tap

This commit is contained in:
Slava Monich 2020-10-10 23:13:44 +03:00
parent 0dbc0e5887
commit 2be36d10a1

View file

@ -25,6 +25,7 @@ import "../js/functions.js" as Functions
Page {
id: imagePage
allowedOrientations: Orientation.All
backNavigation: !imageOnly
property variant photoData;
property variant pictureFileInformation;
@ -43,6 +44,8 @@ Page {
property real oldCenterX;
property real oldCenterY;
property bool imageOnly
Component.onCompleted: {
updatePicture();
}
@ -95,7 +98,7 @@ Page {
contentHeight: imagePinchArea.height;
PullDownMenu {
visible: (typeof imagePage.imageUrl !== "undefined")
visible: !imageOnly && imageUrl
MenuItem {
text: qsTr("Download Picture")
onClicked: {
@ -112,6 +115,12 @@ Page {
id: imageNotification
}
MouseArea {
anchors.fill: parent
visible: singleImage.visible
onClicked: imageOnly = !imageOnly // Toggle "Image only" mode on tap
}
PinchArea {
id: imagePinchArea
width: Math.max( singleImage.width * singleImage.scale, imageFlickable.width )