Merge pull request #61 from monich/image-only

Toggle "Image only" mode on tap
This commit is contained in:
Sebastian Wolf 2020-10-11 18:34:12 +02:00 committed by GitHub
commit 3c073b4840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 )