X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=qml%2FCheckButton.qml;h=e80c91f5e8c20d1c5fbc8c60491e75d6bda5e00a;hp=f00fff8c4523c2fccc58b413e3fd40e58dc42cfb;hb=0a6854919642d691208c88cf23b60bd3a553bf63;hpb=9299fa292ded077de6e80532f3cfc79c523d7d8f diff --git a/qml/CheckButton.qml b/qml/CheckButton.qml index f00fff8..e80c91f 100644 --- a/qml/CheckButton.qml +++ b/qml/CheckButton.qml @@ -20,14 +20,29 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -@IMPORT_QT_QUICK@ +import QtQuick 2.0 CameraToolIcon { id: button - property string normalIcon: "" - property string checkedIcon: "" - property int value: -1 - property int savedValue: -1 + property bool checked: false - iconSource: savedValue == value ? checkedIcon : normalIcon + Rectangle { + anchors.centerIn: parent + width: parent.width * 0.8 + height: parent.height * 0.8 + color: "blue" + opacity: checked ? 0.5 : 0.0 + visible: opacity > 0.0 + z: -1 + radius: width / 2 + border.color: "steelblue" + border.width: 1 + smooth: true + Behavior on opacity { + PropertyAnimation { + duration: 20 + easing.type: Easing.OutQuad + } + } + } }