projects
/
harmattan
/
cameraplus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename ZoomCaptureCancel.qml to CaptureCancel.qml
[harmattan/cameraplus]
/
qml
/
ImageOverlay.qml
diff --git
a/qml/ImageOverlay.qml
b/qml/ImageOverlay.qml
index
a41d838
..
1a73e78
100644
(file)
--- a/
qml/ImageOverlay.qml
+++ b/
qml/ImageOverlay.qml
@@
-104,10
+104,11
@@
Item {
onReleased: parent.captureImage()
}
onReleased: parent.captureImage()
}
-
Zoom
CaptureCancel {
+ CaptureCancel {
anchors.fill: parent
anchors.fill: parent
- zoomCapture: zoomCapture
- onCanceled: {
+ enabled: zoomCapture.zoomPressed
+ onPressed: {
+ zoomCapture.zoomPressed = false
if (!autoFocusTimer.running) {
stopAutoFocus()
}
if (!autoFocusTimer.running) {
stopAutoFocus()
}
@@
-128,7
+129,7
@@
Item {
tools: CameraToolBarTools {
FlashButton {
onClicked: toolBar.push(tools)
tools: CameraToolBarTools {
FlashButton {
onClicked: toolBar.push(tools)
- visible:
cam.device == 0
+ visible:
!overlay.cam.quirks.hasQuirk(Quirks.NoFlash)
}
ImageSceneButton {
}
ImageSceneButton {
@@
-174,7
+175,7
@@
Item {
Indicator {
id: flashIndicator
Indicator {
id: flashIndicator
- visible: !toolBar.expanded &&
cam.device == 0
+ visible: !toolBar.expanded &&
!overlay.cam.quirks.hasQuirk(Quirks.NoFlash)
source: cameraTheme.flashIcon(settings.imageFlashMode)
}
source: cameraTheme.flashIcon(settings.imageFlashMode)
}
@@
-185,8
+186,7
@@
Item {
anchors.rightMargin: 5
anchors.topMargin: 5
anchors.bottomMargin: 5
anchors.rightMargin: 5
anchors.topMargin: 5
anchors.bottomMargin: 5
- property string mp: imageSettings.currentResolutionMegapixel == "" ? "?" : imageSettings.currentResolutionMegapixel
- text: qsTr("%1M").arg(mp)
+ text: imageSettings.currentResolution ? qsTr("%1M").arg(imageSettings.currentResolution.megaPixels) : qsTr("?M")
font.bold: true
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.bold: true
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
@@
-284,15
+284,24
@@
Item {
}
function startAutoFocus() {
}
function startAutoFocus() {
- if (
cam.device == 0
) {
+ if (
!overlay.cam.quirks.hasQuirk(Quirks.NoAutoFocus)
) {
cam.autoFocus.startAutoFocus()
}
}
function stopAutoFocus() {
cam.autoFocus.startAutoFocus()
}
}
function stopAutoFocus() {
- if (
cam.device == 0
) {
+ if (
!overlay.cam.quirks.hasQuirk(Quirks.NoAutoFocus)
) {
cam.autoFocus.stopAutoFocus()
}
}
cam.autoFocus.stopAutoFocus()
}
}
+ function resetToolBar() {
+ if (toolBar.depth() > 1) {
+ toolBar.pop()
+ }
+ }
+
+ function cameraDeviceChanged() {
+ resetToolBar()
+ }
}
}