X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=qml%2FCheckButton.qml;h=e80c91f5e8c20d1c5fbc8c60491e75d6bda5e00a;hp=7c82960eea68ac5d1fc30956b5a6b663aa78ed81;hb=10585acc01502833c6f6b4df0d11f06806cce8d7;hpb=8fda608e8809c2b5c1b0db2a10e6099b73759ce8 diff --git a/qml/CheckButton.qml b/qml/CheckButton.qml index 7c82960..e80c91f 100644 --- a/qml/CheckButton.qml +++ b/qml/CheckButton.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,25 +20,29 @@ * 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 -Button { - id: button - property string normalIcon: "" - property string checkedIcon: "" - property QtObject fader: null - property int value: -1 - property bool doClose: true - property int savedValue: -1 +CameraToolIcon { + id: button + property bool checked: false - width: visible ? 56 : 0 - height: visible ? 56 : 0 - iconSource: !visible ? "" : savedValue == value ? checkedIcon : normalIcon - - onClicked: { - if (doClose) { - close(); - } + 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 + } } + } }