Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rc933552983a659ca4cc351ff4d43d07319adab1e --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision c933552983a659ca4cc351ff4d43d07319adab1e) @@ -28,10 +28,12 @@ property alias text : _text property alias button : _mouseArea + property bool animate : false + width : Variables.touchRectWidth height : Variables.touchRectHeight radius : Variables.touchRectRadius - color: "Transparent" + color : "Transparent" border { color: Colors.borderButton width: Variables.borderWidth @@ -43,5 +45,16 @@ } MouseArea { id: _mouseArea anchors.fill: parent + onPressed: { + if ( animate ) { + _clickAnimation.running = true + } + } } + + SequentialAnimation { id: _clickAnimation + running: false + PropertyAnimation { target: _root; property: "color"; to: _root.border.color; duration: 50; } + PropertyAnimation { target: _root; property: "color"; to: _root.color ; duration: 50; } + } }