From de73cf1c90e2459f5c8b7f4196282887fe0ff623 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Thu, 20 Jul 2017 18:25:01 +0300 Subject: mapwidgetcontextmenu: add an Image for the context menu toggle - add the PNG file into the QRC - add a simple scale animation for the Image on click Signed-off-by: Lubomir I. Ivanov --- mobile-widgets/qml/MapWidgetContextMenu.qml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'mobile-widgets/qml/MapWidgetContextMenu.qml') diff --git a/mobile-widgets/qml/MapWidgetContextMenu.qml b/mobile-widgets/qml/MapWidgetContextMenu.qml index f26a700f7..47616de30 100644 --- a/mobile-widgets/qml/MapWidgetContextMenu.qml +++ b/mobile-widgets/qml/MapWidgetContextMenu.qml @@ -2,8 +2,25 @@ import QtQuick 2.7 Item { - Rectangle { - width: 100; height: width - color: "white" + Image { + id: contextMenuImage + source: "qrc:///mapwidget-context-menu" + + SequentialAnimation { + id:contextMenuImageAnimation + PropertyAnimation { + target: contextMenuImage; property: "scale"; from: 1.0; to: 0.8; duration: 80; + } + PropertyAnimation { + target: contextMenuImage; property: "scale"; from: 0.8; to: 1.0; duration: 60; + } + } + + MouseArea { + anchors.fill: parent + onClicked: { + contextMenuImageAnimation.restart() + } + } } } -- cgit v1.2.3-70-g09d2