X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=qml%2FVideoEvCompButton.qml;h=922cef835ed056ae1c5a3eb94f79a910c5f69645;hb=fe8df7dd5b30cd8eba36fefe267d94ab8b0f1ec9;hp=da1414170972f762ce390665c0c13ce95fb95f17;hpb=2add80172849d59ab5def8dfde13cdfc34d8dac0;p=harmattan%2Fcameraplus diff --git a/qml/VideoEvCompButton.qml b/qml/VideoEvCompButton.qml index da14141..922cef8 100644 --- a/qml/VideoEvCompButton.qml +++ b/qml/VideoEvCompButton.qml @@ -3,7 +3,7 @@ /*! * This file is part of CameraPlus. * - * Copyright (C) 2012 Mohammed Sameer + * Copyright (C) 2012-2013 Mohammed Sameer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,29 +20,43 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -import QtQuick 1.1 -import com.nokia.meego 1.1 +import QtQuick 2.0 import QtCamera 1.0 -Selector { - id: button - - iconSource: settings.videoEvComp == 0 ? "image://theme/icon-m-camera-manual-exposure" : "" - text: settings.videoEvComp == 0 ? "" : settings.videoEvComp.toFixed(1); - font.pixelSize: 19 - timerConstraints: slider.pressed - - title: qsTr("Exposure compensation"); - - widget: Slider { - id: slider - width: 500 - orientation: Qt.Horizontal - minimumValue: cam.evComp.minimum - maximumValue: cam.evComp.maximum - value: settings.videoEvComp - stepSize: 0.1 - onValueChanged: settings.videoEvComp = value.toFixed(1); - Component.onCompleted: { slider.value = settings.videoEvComp.toFixed(1); } +CameraToolIcon { + id: button + + iconSource: settings.videoEvComp == 0 ? cameraTheme.cameraManualExposureIconId : "" + + CameraLabel { + anchors.fill: parent + verticalAlignment: Text.AlignVCenter + visible: settings.videoEvComp != 0 + text: settings.videoEvComp == 0 ? "" : settings.videoEvComp.toFixed(1) + } + + property CameraToolBarTools tools: CameraToolBarTools { + CameraLabel { + height: parent ? parent.height : 0 + text: qsTr("EV") + verticalAlignment: Text.AlignVCenter + } + + CameraSlider { + id: slider + orientation: Qt.Horizontal + minimumValue: cam ? cam.evComp.minimum : 0 + maximumValue: cam ? cam.evComp.maximum : 0 + value: settings.videoEvComp + valueIndicatorVisible: true + stepSize: 0.1 + onValueChanged: settings.videoEvComp = value.toFixed(1) + Component.onCompleted: { slider.value = settings.videoEvComp.toFixed(1) } + } + + CameraToolIcon { + iconSource: cameraTheme.resetIconId + onClicked: slider.value = 0 } + } }