onReleased: parent.captureImage()
}
- ZoomCaptureCancel {
+ CaptureCancel {
anchors.fill: parent
- zoomCapture: zoomCapture
- onCanceled: {
+ enabled: zoomCapture.zoomPressed
+ onPressed: {
+ zoomCapture.zoomPressed = false
if (!autoFocusTimer.running) {
stopAutoFocus()
}
tools: CameraToolBarTools {
FlashButton {
onClicked: toolBar.push(tools)
+ visible: !overlay.cam.quirks.hasQuirk(Quirks.NoFlash)
}
ImageSceneButton {
Indicator {
id: flashIndicator
- visible: !toolBar.expanded
+ visible: !toolBar.expanded && !overlay.cam.quirks.hasQuirk(Quirks.NoFlash)
source: cameraTheme.flashIcon(settings.imageFlashMode)
}
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
}
function startAutoFocus() {
- if (cam.device == 0) {
+ if (!overlay.cam.quirks.hasQuirk(Quirks.NoAutoFocus)) {
cam.autoFocus.startAutoFocus()
}
}
function stopAutoFocus() {
- if (cam.device == 0) {
+ if (!overlay.cam.quirks.hasQuirk(Quirks.NoAutoFocus)) {
cam.autoFocus.stopAutoFocus()
}
}
+ function resetToolBar() {
+ if (toolBar.depth() > 1) {
+ toolBar.pop()
+ }
+ }
+
+ function cameraDeviceChanged() {
+ resetToolBar()
+ }
}