&& dimmer.opacity == 0.0 && !cameraMode.busy
property bool pressed: overlay.recording || capture.pressed ||
zoomSlider.pressed || modeButton.pressed
+ property bool inhibitDim: recording
signal previewAvailable(string uri)
VideoMode {
id: videoMode
camera: cam
+ enablePreview: settings.enablePreview
onPreviewAvailable: overlay.previewAvailable(preview)
}
ZoomCaptureButton {
id: zoomCapture
- onReleased: overlay.toggleRecording()
+ }
+
+ CaptureControl {
+ id: captureControl
+ capturePressed: capture.pressed
+ zoomPressed: zoomCapture.zoomPressed
+ proximityClosed: proximitySensor.sensorClosed
+ onStartCapture: overlay.toggleRecording()
}
CaptureCancel {
anchors.fill: parent
- enabled: zoomCapture.zoomPressed
- onPressed: zoomCapture.zoomPressed = false
+ enabled: captureControl.showCancelBanner
+ onPressed: captureControl.canceled = true
}
CaptureButton {
height: 75
opacity: 0.5
- onClicked: overlay.toggleRecording()
-
visible: controlsVisible
+
+ onExited: {
+ if (mouseX <= 0 || mouseY <= 0 || mouseX > width || mouseY > height) {
+ // Release outside the button:
+ captureControl.canceled = true
+ }
+ }
}
CameraToolBar {
tools: CameraToolBarTools {
VideoTorchButton {
camera: cam
- visible: !overlay.cam.quirks.hasQuirk(Quirks.NoVideoTorch)
+ visible: overlay.cam ? !overlay.cam.quirks.hasQuirk(Quirks.NoVideoTorch) : false
}
VideoSceneButton {
- property bool hide: (overlay.recording && overlay.cam.quirks.hasQuirk(Quirks.NoSceneModeChangeDuringRecording)) || overlay.cam.quirks.hasQuirk(Quirks.NoNightSceneMode)
+ property bool hide: overlay.cam ? (overlay.recording && overlay.cam.quirks.hasQuirk(Quirks.NoSceneModeChangeDuringRecording)) || overlay.cam.quirks.hasQuirk(Quirks.NoNightSceneMode) : false
visible: !hide
onClicked: toolBar.push(tools)
}
}
}
- DisplayState {
- inhibitDim: overlay.recording
- }
-
Connections {
target: Qt.application
onActiveChanged: {