summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Rahn <rahn@kde.org>2016-11-13 22:20:11 (GMT)
committerTorsten Rahn <trahn@testo.de>2016-11-14 00:28:42 (GMT)
commitf1a7db2fa7e635bba9a6517fede36c545d689c72 (patch)
treeda7324a5505ebc7a2e2583988579825bc7b84865
parent6e181e2dea6a06f395469011bc8d86abde8647ed (diff)
Display a circle instead of an arrow for the position marker is speed
is less than 0.5 m/s.
-rw-r--r--src/apps/marble-maps/MainScreen.qml1
-rw-r--r--src/apps/marble-maps/PositionMarker.qml21
2 files changed, 19 insertions, 3 deletions
diff --git a/src/apps/marble-maps/MainScreen.qml b/src/apps/marble-maps/MainScreen.qml
index aa8d560..417a888 100644
--- a/src/apps/marble-maps/MainScreen.qml
+++ b/src/apps/marble-maps/MainScreen.qml
@@ -156,6 +156,7 @@ ApplicationWindow {
showAccuracy: navigationManager.deviated
allowRadiusAnimation: !zoomDetectionTimer.running
allowPositionAnimation: !panningDetectionTimer.running
+ speed: marbleMaps.speed
}
MouseArea {
diff --git a/src/apps/marble-maps/PositionMarker.qml b/src/apps/marble-maps/PositionMarker.qml
index 896ca7d..2efd026 100644
--- a/src/apps/marble-maps/PositionMarker.qml
+++ b/src/apps/marble-maps/PositionMarker.qml
@@ -20,6 +20,7 @@ Item {
property real radius: 100
property bool allowRadiusAnimation: true
property bool allowPositionAnimation: true
+ property real speed: 0
Behavior on radius {
enabled: allowRadiusAnimation
@@ -52,14 +53,28 @@ Item {
radius: root.radius
}
+ Rectangle {
+ visible: root.speed < 0.5
+ width: Screen.pixelDensity * 4
+ height: width
+ anchors.centerIn: parent
+ radius: width/2
+ border {
+ color: "#f2f2f2"
+ width: 4
+ }
+ color: "#004a96"
+ }
+
Image {
id: image
- source: "qrc:///navigation_blue.svg"
- sourceSize.width: width
- sourceSize.height: height
width: Screen.pixelDensity * 6
height: width
anchors.centerIn: parent
+ visible: root.speed >= 0.5
+ source: "qrc:///navigation_blue.svg"
+ sourceSize.width: width
+ sourceSize.height: height
smooth: true
rotation: root.angle
}