Show/hide UI elements for setting resolution and aspect ratio
authorMohammed Sameer <msameer@foolab.org>
Fri, 2 Aug 2013 21:26:06 +0000 (00:26 +0300)
committerMohammed Sameer <msameer@foolab.org>
Fri, 2 Aug 2013 21:26:06 +0000 (00:26 +0300)
depending on the availability of resolutions and/or aspect ratios
for a selected device.

qml/ImageResolutionSettings.qml
qml/VideoResolutionSettings.qml

index 514115d..df1b6b1 100644 (file)
@@ -30,6 +30,7 @@ Column {
 
     SectionHeader {
         text: qsTr("Aspect ratio")
+        visible: aspectRatioRow.visible
     }
 
     CameraButtonRow {
@@ -37,6 +38,7 @@ Column {
         width: parent.width
         enabled: camera ? camera.idle : false
         exclusive: false
+        visible: imageSettings.aspectRatioCount > 1
 
         Repeater {
             model: imageSettings.aspectRatios
@@ -50,6 +52,7 @@ Column {
 
     SectionHeader {
         text: qsTr("Resolution")
+        visible: resolutionsRow.visible
     }
 
     CameraButtonRow {
@@ -57,6 +60,7 @@ Column {
         width: parent.width
         enabled: camera ? camera.idle : false
         exclusive: false
+        visible: imageSettings.resolutions.count > 1
 
         Binding {
             target: imageSettings.resolutions
index 1fbfeb6..c105c55 100644 (file)
@@ -28,6 +28,8 @@ Column {
 
     spacing: 10
 
+    visible: videoSettings.resolutions.count > 1
+
     SectionHeader {
         text: qsTr("Resolution")
     }