subsurface/mobile-widgets/qml/MapWidgetContextMenu.qml
Lubomir I. Ivanov 7dfb168f7f mapwidgetcontextmenu: position the contextMenu on the map
The anchor of the menu itself will be positioned near the edge of the
map widget, while the menu contents will have negative coordinates.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28 07:31:11 -07:00

27 lines
541 B
QML

// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.7
Item {
Image {
id: contextMenuImage
x: -width
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()
}
}
}
}