summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/MapWidget.qml
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qml/MapWidget.qml')
-rw-r--r--mobile-widgets/qml/MapWidget.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml
index 736f7bc7d..96dab8004 100644
--- a/mobile-widgets/qml/MapWidget.qml
+++ b/mobile-widgets/qml/MapWidget.qml
@@ -114,12 +114,25 @@ Item {
}
Image {
+ id: toggleImage
x: 10; y: x
source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite")
+
+ SequentialAnimation {
+ id: toggleImageAnimation
+ PropertyAnimation {
+ target: toggleImage; property: "scale"; from: 1.0; to: 0.8; duration: 120;
+ }
+ PropertyAnimation {
+ target: toggleImage; property: "scale"; from: 0.8; to: 1.0; duration: 80;
+ }
+ }
+
MouseArea {
anchors.fill: parent
onClicked: {
map.activeMapType = map.activeMapType === map.mapType.SATELLITE ? map.mapType.STREET : map.mapType.SATELLITE
+ toggleImageAnimation.restart()
}
}
}