Bring back standby view
authorMohammed Sameer <msameer@foolab.org>
Mon, 15 Jul 2013 21:40:17 +0000 (00:40 +0300)
committerMohammed Sameer <msameer@foolab.org>
Mon, 15 Jul 2013 21:40:17 +0000 (00:40 +0300)
qml/Standby.qml
qml/main.qml
qml/qml.qrc

index 45544d0..ed5eb92 100644 (file)
@@ -24,41 +24,41 @@ import QtQuick 1.1
 import com.nokia.meego 1.0
 
 Rectangle {
-        id: standby
+    id: standby
 
-        property bool show: true
-        property bool policyLost: false
+    property bool show: true
+    property bool policyLost: false
 
-        color: "black"
-        anchors.fill: parent
-        z: 2
+    color: "black"
+    anchors.fill: parent
+    z: 2
 
-        visible: opacity != 0.0
-        opacity: show ? 1.0 : 0.0
+    visible: opacity != 0.0
+    opacity: show ? 1.0 : 0.0
 
-        Behavior on opacity {
-                PropertyAnimation { duration: 250; }
-        }
+    Behavior on opacity {
+        PropertyAnimation { duration: 250 }
+    }
 
-        MouseArea {
-                anchors.fill: parent
-                enabled: parent.visible
-        }
+    MouseArea {
+        anchors.fill: parent
+        enabled: parent.visible
+    }
 
-        Image {
-                id: icon
-                source: "image://theme/icon-l-camera-standby"
-                anchors.centerIn: parent
-        }
+    Image {
+        id: icon
+        source: "image://theme/icon-l-camera-standby"
+        anchors.centerIn: parent
+    }
 
-        Label {
-                anchors.top: icon.bottom
-                anchors.right: parent.right
-                anchors.left: parent.left
-                text: qsTr("Resources lost")
-                color: "white"
-                font.pixelSize: 36
-                horizontalAlignment: Text.AlignHCenter
-                visible: parent.policyLost
-        }
+    Label {
+        anchors.top: icon.bottom
+        anchors.right: parent.right
+        anchors.left: parent.left
+        text: qsTr("Resources lost")
+        color: "white"
+        font.pixelSize: 36
+        horizontalAlignment: Text.AlignHCenter
+        visible: parent.policyLost
+    }
 }
index 6693eb5..e04dadc 100644 (file)
@@ -32,7 +32,6 @@ import QtMobility.location 1.2
 Window {
         id: root
         property alias camera: cam
-//        property bool cameraVisible: mainView.currentIndex == 1
 
         VisualItemModel {
             id: mainModel
@@ -269,9 +268,9 @@ Window {
             repeat: !settings.zoomAsShutter
         }
 
-//        Standby {
-//            policyLost: pipelineManager.state == "policyLost"
-// TODO:
-//            show: !pageStack.currentPage || (pageStack.currentPage.activationData.standbyVisible && pageStack.currentPage.status == PageStatus.Active && pipelineManager.showStandBy)
-//        }
+        Standby {
+            policyLost: pipelineManager.state == "policyLost"
+            show: !Qt.application.active || pipelineManager.showStandBy ||
+                (mainView.currentIndex == 1 && !camera.running)
+        }
 }
index 83cfe5d..5f210f6 100644 (file)
        <file>ZoomCaptureButton.qml</file>
        <file>ZoomCaptureCancel.qml</file>
        <file>PostCaptureItem.qml</file>
+       <file>VideoPlayerPage.qml</file>
+       <file>Standby.qml</file>
 
        <file>CameraPage.qml</file>
-       <file>Standby.qml</file>
        <file>FlashButton.qml</file>
        <file>ImageSceneButton.qml</file>
        <file>ImageEvCompButton.qml</file>
@@ -46,6 +47,5 @@
        <file>VideoWhiteBalanceButton.qml</file>
        <file>VideoColorFilterButton.qml</file>
        <file>VideoMuteButton.qml</file>
-       <file>VideoPlayerPage.qml</file>
     </qresource>
 </RCC>