summaryrefslogtreecommitdiffstats
path: root/app/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'app/main.qml')
-rw-r--r--app/main.qml26
1 files changed, 14 insertions, 12 deletions
diff --git a/app/main.qml b/app/main.qml
index 9710c99..0641efe 100644
--- a/app/main.qml
+++ b/app/main.qml
@@ -26,19 +26,12 @@ ApplicationWindow {
width: 1920
height: 720
- CameraControl {
- id:cameracontrol
- listWH: true
- device: camdev_device
- width: root.width
- height:80
- }
-
Camera {
id: camdev_device
- width: root.width
- height: root.height - cameracontrol.height
- anchors.top: cameracontrol.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: height * cameracontrol.ratio
+ height: root.height
+ anchors.top: parent.top
onIsrunningChanged: {
camerabg.visible = !isrunning
}
@@ -52,8 +45,17 @@ ApplicationWindow {
}
}
+ CameraControl {
+ id:cameracontrol
+ anchors.horizontalCenter: parent.horizontalCenter
+ ratio: 4/3
+ device: camdev_device
+ width: camdev_device.width
+ height:80
+ }
+
function changeVisible(visible) {
- console.log("camapp visible is " + visible)
+ console.log("camera visible is " + visible)
cameracontrol.switchChecked = visible
}
}