Added a standby widget to be shown when the camera is not running and reworked the...
authorMohammed Sameer <msameer@foolab.org>
Sun, 9 Sep 2012 14:51:08 +0000 (17:51 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 9 Sep 2012 14:51:08 +0000 (17:51 +0300)
qml/CameraPage.qml
qml/ImagePage.qml
qml/VideoPage.qml

index 5e82edc..12f6637 100644 (file)
@@ -4,8 +4,25 @@ import com.nokia.meego 1.1
 import QtCamera 1.0
 
 Page {
+
+        property alias standbyWidget: standby
+
+        Rectangle {
+                // TODO: color
+                // TODO: fade out transition
+                // TODO: there is a toolbar visible on the first startup
+                id: standby
+                color: "black"
+                anchors.fill: parent
+                visible: !cam.running
+                Image {
+                        source: "image://theme/icon-l-camera-standby"
+                        anchors.centerIn: parent
+                }
+        }
+
         property Camera cam: null
-        property bool controlsVisible: true
+        property bool controlsVisible: cam.running && !standby.visible
 
         anchors.fill: parent
 
index 9c1e669..9a36699 100644 (file)
@@ -6,7 +6,7 @@ import QtCamera 1.0
 CameraPage {
         id: page
 
-        controlsVisible: capture.visible
+        controlsVisible: capture.visible && cam.running && !standbyWidget.visible
 
         Button {
                 id: capture
@@ -30,7 +30,7 @@ CameraPage {
 
         FlashButton {
                 id: flash
-                visible: capture.visible
+                visible: controlsVisible
                 anchors.top: parent.top
                 anchors.left: parent.left
                 anchors.topMargin: 20
@@ -39,7 +39,7 @@ CameraPage {
 
         ImageSceneButton {
                 id: scene
-                visible: capture.visible
+                visible: controlsVisible
                 anchors.top: flash.bottom
                 anchors.left: parent.left
                 anchors.topMargin: 10
@@ -48,7 +48,7 @@ CameraPage {
 
         EvCompButton {
                 id: evComp
-                visible: capture.visible
+                visible: controlsVisible
                 anchors.top: scene.bottom
                 anchors.left: parent.left
                 anchors.topMargin: 10
@@ -56,7 +56,7 @@ CameraPage {
         }
 
         Indicators {
-                visible: capture.visible
+                visible: controlsVisible
                 anchors.bottom: parent.bottom
                 anchors.bottomMargin: 20
                 anchors.left: parent.left
index ab46692..e53adae 100644 (file)
@@ -6,7 +6,7 @@ import QtCamera 1.0
 CameraPage {
         id: page
 
-        controlsVisible: recording.visible
+        controlsVisible: recording.visible && cam.running && !standbyWidget.visible
 
         orientationLock: PageOrientation.LockLandscape