Fixed image preview
[harmattan/cameraplus] / qml / VideoSettingsPage.qml
index d737402..9fb1d84 100644 (file)
@@ -31,7 +31,8 @@ CameraPage {
         id: page
         controlsVisible: false
         policyMode: CameraResources.Video
-        needsPipeline: false
+        enableViewfinder: false
+        standbyVisible: !Qt.application.active
 
         Rectangle {
                 color: "black"
@@ -39,6 +40,7 @@ CameraPage {
         }
 
         Flickable {
+                id: flickable
                 anchors.top: parent.top
                 anchors.left: parent.left
                 anchors.right: parent.right
@@ -53,29 +55,39 @@ CameraPage {
                         spacing: 10
 
                         Label {
-                                // TODO:
+                                font.pixelSize: 36
                                 text: qsTr("Video settings");
                         }
 
-                        Row {
-                                width: parent.width
+                        SectionHeader {
+                                text: qsTr("Resolution");
+                        }
 
-                                ListItem {
-                                        id: wb
-                                        width: parent.width / 2
-                                        title: qsTr("White balance");
-                                        subtitle: Data.wbName(settings.videoWhiteBalance);
-                                        iconId: Data.wbSelectedIcon(settings.videoWhiteBalance);
-                                        onClicked: openFile("VideoWhiteBalancePage.qml");
-                                }
+                        ButtonRow {
+                                anchors.horizontalCenter: parent.horizontalCenter
+                                exclusive: false
+
+                                Repeater {
+                                        id: resolutions
+
+                                        model: videoSettings.resolutions
+
+                                        function name(name, res) {
+                                                return name.charAt(0).toUpperCase() + name.slice(1) + " " + res;
+                                        }
+
+                                        delegate: Button {
+                                                text: resolutions.name(resolutionName, resolution);
+                                                checked: settings.videoResolution == resolutionName;
+                                                onClicked: {
+                                                        if (!cam.idle) {
+                                                                showError(qsTr("Camera is busy saving."));
+                                                                return;
+                                                        }
 
-                                ListItem {
-                                        id: cf
-                                        width: parent.width / 2
-                                        title: qsTr("Color filter");
-                                        subtitle: Data.cfName(settings.videoColorFilter);
-                                        iconId: Data.cfSelectedIcon(settings.videoColorFilter);
-                                        onClicked: openFile("VideoColorFilterPage.qml");
+                                                        settings.videoResolution = resolutionName;
+                                                }
+                                        }
                                 }
                         }
 
@@ -90,7 +102,7 @@ CameraPage {
                 anchors.bottom: parent.bottom
                 tools: ToolBarLayout {
                         id: layout
-                        ToolIcon { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
+                        ToolIcon { iconId: "icon-m-toolbar-back-white"; onClicked: pageStack.pop(); }
                 }
         }
 }