Reworked ModeButton to use a Switch
[harmattan/cameraplus] / qml / ImageSceneButton.qml
index 58649d7..59ba290 100644 (file)
@@ -28,23 +28,10 @@ import "data.js" as Data
 Selector {
         id: button
 
-        property int value: settings.imageSceneMode
-
-        iconSource: sceneIcon(scene.value);
+        iconSource: "image://theme/" + Data.ismIcon(settings.imageSceneMode);
 
         title: qsTr("Scene mode");
 
-        function sceneIcon(val) {
-                // TODO: use the js functions.
-                var x = row.children.length;
-                var i = 0;
-                for (i = 0; i < x; i++) {
-                        if (row.children[i].value == val) {
-                                return row.children[i].normalIcon;
-                        }
-                }
-        }
-
         widget: Row {
                 id: row
                 height: button.checked ? 64 : 0