mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 21:20:19 +00:00
de73cf1c90
- add the PNG file into the QRC - add a simple scale animation for the Image on click Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
26 lines
529 B
QML
26 lines
529 B
QML
// SPDX-License-Identifier: GPL-2.0
|
|
import QtQuick 2.7
|
|
|
|
Item {
|
|
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()
|
|
}
|
|
}
|
|
}
|
|
}
|