Toggle "Image only" mode on tap
This commit is contained in:
parent
0dbc0e5887
commit
2be36d10a1
1 changed files with 10 additions and 1 deletions
|
@ -25,6 +25,7 @@ import "../js/functions.js" as Functions
|
||||||
Page {
|
Page {
|
||||||
id: imagePage
|
id: imagePage
|
||||||
allowedOrientations: Orientation.All
|
allowedOrientations: Orientation.All
|
||||||
|
backNavigation: !imageOnly
|
||||||
|
|
||||||
property variant photoData;
|
property variant photoData;
|
||||||
property variant pictureFileInformation;
|
property variant pictureFileInformation;
|
||||||
|
@ -43,6 +44,8 @@ Page {
|
||||||
property real oldCenterX;
|
property real oldCenterX;
|
||||||
property real oldCenterY;
|
property real oldCenterY;
|
||||||
|
|
||||||
|
property bool imageOnly
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
updatePicture();
|
updatePicture();
|
||||||
}
|
}
|
||||||
|
@ -95,7 +98,7 @@ Page {
|
||||||
contentHeight: imagePinchArea.height;
|
contentHeight: imagePinchArea.height;
|
||||||
|
|
||||||
PullDownMenu {
|
PullDownMenu {
|
||||||
visible: (typeof imagePage.imageUrl !== "undefined")
|
visible: !imageOnly && imageUrl
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Download Picture")
|
text: qsTr("Download Picture")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -112,6 +115,12 @@ Page {
|
||||||
id: imageNotification
|
id: imageNotification
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: singleImage.visible
|
||||||
|
onClicked: imageOnly = !imageOnly // Toggle "Image only" mode on tap
|
||||||
|
}
|
||||||
|
|
||||||
PinchArea {
|
PinchArea {
|
||||||
id: imagePinchArea
|
id: imagePinchArea
|
||||||
width: Math.max( singleImage.width * singleImage.scale, imageFlickable.width )
|
width: Math.max( singleImage.width * singleImage.scale, imageFlickable.width )
|
||||||
|
|
Loading…
Reference in a new issue