Commit 0a68cd2b authored by Marco Martin's avatar Marco Martin

pinch zoom

parent 08af9b8d
......@@ -182,7 +182,7 @@ FocusScope {
height: units.gridUnit * 20
currentZoom: camera.digitalZoom
maximumZoom: Math.min(4.0, camera.maximumDigitalZoom)
maximumZoom: camera.maximumDigitalZoom
onZoomTo: camera.setDigitalZoom(value)
}
}
......@@ -168,6 +168,17 @@ Rectangle {
source: camera
orientation: -90
}
PinchArea {
anchors.fill: parent
property real initialZoom
onPinchStarted: {
initialZoom = camera.digitalZoom;
}
onPinchUpdated: {
var scale = camera.maximumDigitalZoom/8 * pinch.scale - camera.maximumDigitalZoom/8;
camera.setDigitalZoom(Math.min(camera.maximumDigitalZoom, camera.digitalZoom + scale))
}
}
PhotoCaptureControls {
id: stillControls
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment