Commit fc9fcc19 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Calls/IncallFullscreenWindow): preview supports zoom

parent bf731086
...@@ -329,6 +329,8 @@ Window { ...@@ -329,6 +329,8 @@ Window {
id: cameraPreview id: cameraPreview
Camera { Camera {
property bool scale: false
Drag.active: cameraDrag.held Drag.active: cameraDrag.held
Drag.source: cameraDrag Drag.source: cameraDrag
Drag.hotSpot.x: width / 2 Drag.hotSpot.x: width / 2
...@@ -337,11 +339,22 @@ Window { ...@@ -337,11 +339,22 @@ Window {
call: incall.call call: incall.call
isPreview: true isPreview: true
height: CallStyle.actionArea.userVideo.height height: CallStyle.actionArea.userVideo.height * (scale ? 2 : 1)
width: CallStyle.actionArea.userVideo.width width: CallStyle.actionArea.userVideo.width * (scale ? 2 : 1)
Component.onCompleted: {
x = incall.width / 2 - width / 2
y = incall.height - height
}
x: incall.width / 2 - width / 2 // Workaround.
y: incall.height - height // x and y are not binded to functions because if the scale is updated,
// the position of the preview is reset.
Connections {
target: incall
onHeightChanged: y = incall.height - parent.height
onWidthChanged: x = incall.width / 2 - parent.width / 2
}
MouseArea { MouseArea {
id: cameraDrag id: cameraDrag
...@@ -371,6 +384,8 @@ Window { ...@@ -371,6 +384,8 @@ Window {
parent.y = incall.height - parent.height parent.y = incall.height - parent.height
} }
} }
onWheel: parent.scale = wheel.angleDelta.y > 0
} }
} }
} }
......
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