Skip to content

Commit

Permalink
Zoom under Qt6 seemingly not working, try fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Nov 14, 2023
1 parent 620cf6a commit c789594
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/qml/imports/QFieldControls/+Qt6/QFieldCamera.qml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ Popup {
PinchHandler {
enabled: cameraItem.visible && cameraItem.isCapturing
target: null
grabPermissions: PointerHandler.CanTakeOverFromAnything | PointerHandler.TakeOverForbidden
acceptedDevices: PointerDevice.TouchScreen | PointerDevice.TouchPad

property real oldScale: 1.0
Expand Down Expand Up @@ -302,7 +303,7 @@ Popup {

QfToolButton {
id: zoomButton
visible: cameraItem.isCapturing
visible: cameraItem.isCapturing && (camera.maximumZoomFactor !== 1.0 || camera.minimumZoomFactor !== 1.0)

x: cameraItem.isPortraitMode ? (parent.width / 4) - (width / 2) : (parent.width - width) / 2
y: cameraItem.isPortraitMode ? (parent.height - height) / 2 : (parent.height / 4) * 3 - (height / 2)
Expand Down

0 comments on commit c789594

Please sign in to comment.