Fixed image preview
[harmattan/cameraplus] / qml / CameraSettings.qml
index 8a14614..b9e6057 100644 (file)
@@ -26,46 +26,17 @@ import com.nokia.meego 1.1
 Column {
         id: col
         spacing: 10
+        width: parent.width
 
         Label {
-                // TODO:
+                font.pixelSize: 36
                 text: qsTr("Camera settings");
-        }
-
-        SectionHeader {
-                text: qsTr("Show captured content");
-        }
-
-        ButtonRow {
-                anchors.horizontalCenter: parent.horizontalCenter
-
-                Button {
-                        text: qsTr("Disabled");
-                        checked: settings.postCaptureTimeout == 0;
-                        onClicked: settings.postCaptureTimeout = 0;
-                }
-
-                Button {
-                        text: qsTr("2 seconds");
-                        checked: settings.postCaptureTimeout == 2;
-                        onClicked: settings.postCaptureTimeout = 2;
-                }
-
-                Button {
-                        text: qsTr("5 seconds");
-                        checked: settings.postCaptureTimeout == 10;
-                        onClicked: settings.postCaptureTimeout = 10;
-                }
-
-                Button {
-                        text: qsTr("No timeout");
-                        checked: settings.postCaptureTimeout == -1;
-                        onClicked: settings.postCaptureTimeout = -1;
-                }
+                width: parent.width
         }
 
         SectionHeader {
                 text: qsTr("Creator name");
+                width: parent.width
         }
 
         TextField {
@@ -75,6 +46,26 @@ Column {
                 onTextChanged: settings.creatorName = text;
         }
 
+        Item {
+                width: parent.width
+                height: Math.max(enableCameraSoundsLabel.height, enableCameraSounds.height);
+
+                Label {
+                        id: enableCameraSoundsLabel
+                        anchors.left: parent.left
+                        text: qsTr("Enable camera sounds");
+                }
+
+                Switch {
+                        id: enableCameraSounds
+                        anchors.right: parent.right
+                        // We have to do it that way because QML complains about a binding
+                        // loop for checked if we bind the checked property to the settings value.
+                        Component.onCompleted: checked = settings.soundEnabled;
+                        onCheckedChanged: settings.soundEnabled = checked;
+                }
+        }
+
         Item {
                 width: parent.width
                 height: Math.max(useGpsLabel.height, useGps.height);