No need for the when condition for binding camera zoom value to slider value
[harmattan/cameraplus] / qml / VideoResolutionSettings.qml
index e80be20..c105c55 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-import QtQuick 1.1
-import com.nokia.meego 1.1
+import QtQuick 2.0
+import QtCamera 1.0
 
 Column {
+    property Camera camera: null
+
     spacing: 10
 
+    visible: videoSettings.resolutions.count > 1
+
     SectionHeader {
         text: qsTr("Resolution")
     }
 
-    ButtonRow {
+    CameraButtonRow {
         width: parent.width
-        enabled: cam.idle
+        enabled: camera ? camera.idle : false
         exclusive: false
 
         Repeater {
@@ -40,8 +44,8 @@ Column {
 
             model: videoSettings.resolutions
 
-            delegate: Button {
-                font.capitalization: Font.Capitalize
+            delegate: CameraButton {
+                capitalize: true
                 text: qsTr("%1 %2").arg(resolutionName).arg(resolution)
                 checked: settings.videoResolution == resolutionName
                 onClicked: settings.videoResolution = resolutionName