2
import Ubuntu.Components 1.1
4
import "utils.js" as Utils
8
title: Utils.getNameOfFile(file.path);
12
text: i18n.tr("Details")
14
onTriggered: pageStack.push(Qt.resolvedUrl("DetailsPage.qml"))
21
contentHeight: image.height
28
property real lastWidth
29
property real lastHeight
30
property double p1toC_X
31
property double p1toC_Y
32
property double contentInitX
33
property double contentInitY
36
lastWidth = image.width
37
lastHeight = image.height
39
contentInitX = flickImg.contentX
40
contentInitY = flickImg.contentY
48
newWidth = lastWidth*pinch.scale;
50
if (newWidth < image.startWidth)
51
newWidth = image.startWidth;
52
else if (newWidth > image.sourceSize.width)
53
newWidth = image.sourceSize.width;
55
flickImg.contentWidth = newWidth;
57
flickImg.contentX = contentInitX-(lastWidth-newWidth)/2
58
flickImg.contentY = contentInitY-(lastHeight-image.height)/2
65
property real startWidth
68
objectName: "imageItem"
72
fillMode: Image.PreserveAspectFit
75
Component.onCompleted: {
76
if (width > sourceSize.width)
77
startWidth = sourceSize.width