Fixes for changing video resolution between 16:9 and 4:3
[harmattan/cameraplus] / qml / VideoResolutionSettings.qml
index aa89d10..d6323c5 100644 (file)
@@ -28,19 +28,16 @@ Column {
 
     spacing: 10
 
-    property string __resolution: settings.device == 1 ?
-        settings.secondaryVideoResolution : settings.primaryVideoResolution
-
     visible: videoSettings.resolutions.count > 1
 
     SectionHeader {
         text: qsTr("Resolution")
     }
 
-    CameraButtonRow {
+    Row {
+        id: resoultionsRow
         width: parent.width
         enabled: camera ? camera.idle : false
-        exclusive: false
 
         Repeater {
             id: resolutions
@@ -48,15 +45,13 @@ Column {
             model: videoSettings.resolutions
 
             delegate: CameraButton {
+                width: resoultionsRow.width / resolutions.count
                 capitalize: true
                 text: qsTr("%1 %2").arg(resolutionName).arg(resolution)
-                checked: __resolution == resolutionName
+                checked: settings.videoResolution == resolutionName
                 onClicked: {
-                    if (settings.device == 1) {
-                        settings.secondaryVideoResolution = resolutionName
-                    } else {
-                        settings.primaryVideoResolution = resolutionName
-                    }
+                    settings.videoAspectRatio = resolutionAspectRatio
+                    settings.videoResolution = resolutionName
                 }
             }
         }