mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mapwidget.qml: move the new map type toggle on top of the map
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
09a0f74bd8
commit
b0cf820bef
1 changed files with 18 additions and 18 deletions
|
@ -112,28 +112,28 @@ Item {
|
||||||
mapHelper.model.selectedUuid = 0
|
mapHelper.model.selectedUuid = 0
|
||||||
animateMapZoomOut()
|
animateMapZoomOut()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: toggleImage
|
id: toggleImage
|
||||||
x: 10; y: x
|
x: 10; y: x
|
||||||
source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite")
|
source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite")
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: toggleImageAnimation
|
id: toggleImageAnimation
|
||||||
PropertyAnimation {
|
PropertyAnimation {
|
||||||
target: toggleImage; property: "scale"; from: 1.0; to: 0.8; duration: 120;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
PropertyAnimation {
|
||||||
|
target: toggleImage; property: "scale"; from: 0.8; to: 1.0; duration: 80;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
map.activeMapType = map.activeMapType === map.mapType.SATELLITE ? map.mapType.STREET : map.mapType.SATELLITE
|
map.activeMapType = map.activeMapType === map.mapType.SATELLITE ? map.mapType.STREET : map.mapType.SATELLITE
|
||||||
toggleImageAnimation.restart()
|
toggleImageAnimation.restart()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue