Request theme icons instead of hardcoding paths
authorMohammed Sameer <msameer@foolab.org>
Tue, 4 Sep 2012 21:46:38 +0000 (00:46 +0300)
committerMohammed Sameer <msameer@foolab.org>
Tue, 4 Sep 2012 21:46:38 +0000 (00:46 +0300)
qml/ColorToneButton.qml
qml/EvCompButton.qml
qml/FlashButton.qml
qml/ImagePage.qml
qml/ImageSceneButton.qml
qml/ModeButton.qml
qml/VideoPage.qml
qml/VideoSceneButton.qml
qml/VideoTorchButton.qml
qml/WhiteBalanceButton.qml

index aaa13cc..b917153 100644 (file)
@@ -44,48 +44,48 @@ Selector {
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-no-filter.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-no-filter-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-no-filter"
+                        checkedIcon: "image://theme/icon-m-camera-no-filter-selected"
                         controller: ct
                         value: ColorTone.Normal
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-filter-black-white.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-filter-black-white-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-filter-black-white"
+                        checkedIcon: "image://theme/icon-m-camera-filter-black-white-selected"
                         controller: ct
                         value: ColorTone.GrayScale
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-filter-sepia.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-filter-sepia-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-filter-sepia"
+                        checkedIcon: "image://theme/icon-m-camera-filter-sepia-selected"
                         controller: ct
                         value: ColorTone.Sepia
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-filter-vivid.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-filter-vivid-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-filter-vivid"
+                        checkedIcon: "image://theme/icon-m-camera-filter-vivid-selected"
                         controller: ct
                         value: ColorTone.Vivid
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes//blanco/meegotouch/icons/icon-m-camera-filter-negative.png"
-                        checkedIcon: "/usr/share/themes//blanco/meegotouch/icons/icon-m-camera-filter-negative-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-filter-negative"
+                        checkedIcon: "image://theme/icon-m-camera-filter-negative-selected"
                         controller: ct
                         value: ColorTone.Negative
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-filter-solarize.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-filter-solarize-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-filter-solarize"
+                        checkedIcon: "image://theme/icon-m-camera-filter-solarize-selected"
                         controller: ct
                         value: ColorTone.Solarize
                         doClose: false
index 53c0f44..c5292e3 100644 (file)
@@ -8,7 +8,7 @@ Selector {
 
         property alias value: evComp.value
 
-        iconSource: evComp.value == 0 ? "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-manual-exposure.png" : ""
+        iconSource: evComp.value == 0 ? "image://theme/icon-m-camera-manual-exposure" : ""
         text: evComp.value == 0 ? "" : evComp.value.toFixed(1);
         font.pixelSize: 19
         timerConstraints: slider.pressed
index c410adb..80034b0 100644 (file)
@@ -41,29 +41,29 @@ Selector {
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-flash-auto.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-flash-auto-pressed.png"
+                        normalIcon: "image://theme/icon-m-camera-flash-auto"
+                        checkedIcon: "image://theme/icon-m-camera-flash-auto-pressed"
                         controller: flash
                         value: Flash.Auto
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-flash-always.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-flash-always-pressed.png"
+                        normalIcon: "image://theme/icon-m-camera-flash-always"
+                        checkedIcon: "image://theme/icon-m-camera-flash-always-pressed"
                         controller: flash
                         value: Flash.On
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-flash-off.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-flash-off-pressed.png"
+                        normalIcon: "image://theme/icon-m-camera-flash-off"
+                        checkedIcon: "image://theme/icon-m-camera-flash-off-pressed"
                         controller: flash
                         value: Flash.Off
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-flash-red-eye.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-flash-red-eye-pressed.png"
+                        normalIcon: "image://theme/icon-m-camera-flash-red-eye"
+                        checkedIcon: "image://theme/icon-m-camera-flash-red-eye-pressed"
                         controller: flash
                         value: Flash.RedEye
                 }
index 71d1685..085cc98 100644 (file)
@@ -13,10 +13,11 @@ CameraPage {
                 anchors.right: parent.right
                 anchors.rightMargin: 20
                 anchors.verticalCenter: parent.verticalCenter
-                iconSource: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-shutter.png"
+                iconSource: "image://theme/icon-m-camera-shutter"
                 width: 75
                 height: 75
                 opacity: 0.5
+                // TODO:
                 onClicked: imageMode.capture("/home/developer/foo.png");
                 visible: imageMode.canCapture && !cameraMode.animationRunning && !previewAnimationRunning
         }
index 3ce47c0..5900492 100644 (file)
@@ -41,43 +41,43 @@ Selector {
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-auto.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-auto-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-scene-auto"
+                        checkedIcon: "image://theme/icon-m-camera-scene-auto-selected"
                         controller: scene
                         value: Scene.Auto
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-macro.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-macro-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-scene-macro"
+                        checkedIcon: "image://theme/icon-m-camera-scene-macro-selected"
                         controller: scene
                         value: Scene.Closeup
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-landscape.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-landscape-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-scene-landscape"
+                        checkedIcon: "image://theme/icon-m-camera-scene-landscape-selected"
                         controller: scene
                         value: Scene.Landscape
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-portrait.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-portrait-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-scene-portrait"
+                        checkedIcon: "image://theme/icon-m-camera-scene-portrait-selected"
                         controller: scene
                         value: Scene.Portrait
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-night.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-night-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-night"
+                        checkedIcon: "image://theme/icon-m-camera-night-selected"
                         controller: scene
                         value: Scene.Night
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-sports.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-sports-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-scene-sports"
+                        checkedIcon: "image://theme/icon-m-camera-scene-sports-selected"
                         controller: scene
                         value: Scene.Sport
                 }
index e051c16..c44b4fe 100644 (file)
@@ -31,18 +31,18 @@ Rectangle {
                         id: image
                         width: button.width
                         height: width
-                        property string released: "icon-m-viewfinder-camera.png"
-                        property string active: "icon-m-viewfinder-camera-selected.png"
-                        source: mouse.pressed ? "/usr/share/themes/blanco/meegotouch/icons/" + released : button.mode == 0 ? "/usr/share/themes/blanco/meegotouch/icons/" + active : "/usr/share/themes/blanco/meegotouch/icons/" + released
+                        property string released: "icon-m-viewfinder-camera"
+                        property string active: "icon-m-viewfinder-camera-selected"
+                        source: mouse.pressed ? "image://theme/" + released : button.mode == 0 ? "image://theme/" + active : "image://theme/" + released
                 }
 
                 Image {
                         id: video
                         width: button.width
                         height: width
-                        property string released: "icon-m-camera-video-record.png"
-                        property string active: "icon-m-camera-video-selected.png"
-                        source: mouse.pressed ? "/usr/share/themes/blanco/meegotouch/icons/" + released : button.mode == 1 ? "/usr/share/themes/blanco/meegotouch/icons/" + active : "/usr/share/themes/blanco/meegotouch/icons/" + released
+                        property string released: "icon-m-camera-video-record"
+                        property string active: "icon-m-camera-video-selected"
+                        source: mouse.pressed ? "image://theme/" + released : button.mode == 1 ? "image://theme/" + active : "image://theme/" + released
                 }
         }
 
index 623e885..ab46692 100644 (file)
@@ -15,12 +15,13 @@ CameraPage {
                 anchors.right: parent.right
                 anchors.rightMargin: 20
                 anchors.verticalCenter: parent.verticalCenter
-                iconSource: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-video-record.png"
+                iconSource: "image://theme/icon-m-camera-video-record"
                 width: 75
                 height: 75
                 opacity: 0.5
                 onClicked: {
                         if (!videoMode.recording) {
+                // TODO:
                                 videoMode.startRecording("/home/developer/foo.mp4");
                         }
                         else {
index 7fb90e2..5f11502 100644 (file)
@@ -41,15 +41,15 @@ Selector {
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-auto.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-scene-auto-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-scene-auto"
+                        checkedIcon: "image://theme/icon-m-camera-scene-auto-selected"
                         controller: scene
                         value: Scene.Auto
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-video-night.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-video-night-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-video-night"
+                        checkedIcon: "image://theme/icon-m-camera-video-night-selected"
                         controller: scene
                         value: Scene.Night
                 }
index 07e0688..dd75933 100644 (file)
@@ -9,7 +9,7 @@ Button {
         height: 56
         opacity: 0.5
 
-        iconSource: torch.on ? "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-torch-on.png" : "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-torch-off.png"
+        iconSource: torch.on ? "image://theme/icon-m-camera-torch-on" : "image://theme/icon-m-camera-torch-off"
         onClicked: torch.on = !torch.on
         VideoTorch {
                 id: torch
index e2a2bae..bdd167d 100644 (file)
@@ -43,40 +43,40 @@ Selector {
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-auto.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-auto-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-whitebalance-auto"
+                        checkedIcon: "image://theme/icon-m-camera-whitebalance-auto-selected"
                         controller: wb
                         value: WhiteBalance.Auto
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-cloudy.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-cloudy-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-whitebalance-cloudy"
+                        checkedIcon: "image://theme/icon-m-camera-whitebalance-cloudy-selected"
                         controller: wb
                         value: WhiteBalance.Cloudy
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-sunny.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-sunny-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-whitebalance-sunny"
+                        checkedIcon: "image://theme/icon-m-camera-whitebalance-sunny-selected"
                         controller: wb
                         value: WhiteBalance.Sunset
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-tungsten.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-tungsten-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-whitebalance-tungsten"
+                        checkedIcon: "image://theme/icon-m-camera-whitebalance-tungsten-selected"
                         controller: wb
                         value: WhiteBalance.Tungsten
                         doClose: false
                 }
 
                 CheckButton {
-                        normalIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-fluorescent.png"
-                        checkedIcon: "/usr/share/themes/blanco/meegotouch/icons/icon-m-camera-whitebalance-fluorescent-selected.png"
+                        normalIcon: "image://theme/icon-m-camera-whitebalance-fluorescent"
+                        checkedIcon: "image://theme/icon-m-camera-whitebalance-fluorescent-selected"
                         controller: wb
                         value: WhiteBalance.Flourescent
                         doClose: false