From: Mohammed Sameer Date: Thu, 8 Aug 2013 21:33:58 +0000 (+0300) Subject: Replace icons with text for image resolution indicator X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=commitdiff_plain;h=4f63e9377095787edfb4fb1fbe31bd887bb7843a Replace icons with text for image resolution indicator --- diff --git a/qml/ImageOverlay.qml b/qml/ImageOverlay.qml index e62c6e0..20c9d9e 100644 --- a/qml/ImageOverlay.qml +++ b/qml/ImageOverlay.qml @@ -177,11 +177,18 @@ Item { source: "image://theme/" + cameraTheme.flashIndicatorIcon(settings.imageFlashMode) } - Indicator { - id: resolutionIndicator - property string imageAspectRatio: settings.device == 1 ? settings.secondaryImageAspectRatio : settings.primaryImageAspectRatio - property string imageResolution: settings.device == 1 ? settings.secondaryImageResolution : settings.primaryImageResolution - source: "image://theme/" + cameraTheme.imageIcon(imageAspectRatio, imageResolution, settings.device) + CameraLabel { + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: 5 + anchors.rightMargin: 5 + anchors.topMargin: 5 + anchors.bottomMargin: 5 + property string mp: imageSettings.currentResolutionMegapixel == "" ? "?" : imageSettings.currentResolutionMegapixel + text: qsTr("%1M").arg(mp) + font.bold: true + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter } Indicator { diff --git a/qml/harmattan/CameraTheme.qml b/qml/harmattan/CameraTheme.qml index c17fcad..f6e27b8 100644 --- a/qml/harmattan/CameraTheme.qml +++ b/qml/harmattan/CameraTheme.qml @@ -96,30 +96,6 @@ QtObject { } } - property variant __imageData: [ - ["3:2", "low", "icon-m-camera-resolution-3m"], - ["3:2", "medium", "icon-m-camera-resolution-6m"], - ["3:2", "high", "icon-m-camera-resolution-7m"], - ["4:3", "low", "icon-m-camera-resolution-3m"], - ["4:3", "medium", "icon-m-camera-resolution-6m"], - ["4:3", "high", "icon-m-camera-resolution-8m"], - ["16:9", "low", "icon-m-camera-resolution-3m"], - ["16:9", "medium", "icon-m-camera-resolution-6m"], - ["16:9", "high", "icon-m-camera-resolution-7m"] - ] - - function imageIcon(ratio, res, device) { - var x = 0 - var len = __imageData.length - for (x = 0; x < len; x++) { - if (__imageData[x][0] == ratio && __imageData[x][1] == res) { - return __imageData[x][2] - } - } - - return "" - } - function whiteBalanceIcon(val) { switch (val) { case WhiteBalance.Auto: