Use Data.ismIcon() for ImageSceneButton
authorMohammed Sameer <msameer@foolab.org>
Tue, 9 Oct 2012 21:50:49 +0000 (00:50 +0300)
committerMohammed Sameer <msameer@foolab.org>
Tue, 9 Oct 2012 21:50:49 +0000 (00:50 +0300)
qml/ImageSceneButton.qml

index 58649d7..c15d2c0 100644 (file)
@@ -30,21 +30,10 @@ Selector {
 
         property int value: settings.imageSceneMode
 
-        iconSource: sceneIcon(scene.value);
+        iconSource: "image://theme/" + Data.ismIcon(scene.value);
 
         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