summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Rahn <rahn@kde.org>2016-11-11 18:37:04 (GMT)
committerTorsten Rahn <trahn@testo.de>2016-11-11 18:37:26 (GMT)
commit841628cb8873c2e7033e26c692d3bd4efe8cd848 (patch)
treed524d5b8edee85dc12a45f338610714b6369dfeb
parent9d90adc92799eb12ade6280b7ec65caf7ba01cd1 (diff)
Minor fixes in the Marble Maps UI qml code.
-rw-r--r--src/apps/marble-maps/MainScreen.qml3
-rw-r--r--src/apps/marble-maps/PositionMarker.qml15
-rw-r--r--src/lib/marble/declarative/Routing.cpp5
3 files changed, 14 insertions, 9 deletions
diff --git a/src/apps/marble-maps/MainScreen.qml b/src/apps/marble-maps/MainScreen.qml
index a8f5590..4453b47 100644
--- a/src/apps/marble-maps/MainScreen.qml
+++ b/src/apps/marble-maps/MainScreen.qml
@@ -129,8 +129,7 @@ ApplicationWindow {
angle: marbleMaps.angle
visible: marbleMaps.positionAvailable && marbleMaps.positionVisible
radius: navigationManager.screenAccuracy
- color: navigationManager.deviated ? "#40ff0000" : "transparent"
- border.color: navigationManager.deviated ? "red" : "transparent"
+ showAccuracy: navigationManager.deviated
}
MouseArea {
diff --git a/src/apps/marble-maps/PositionMarker.qml b/src/apps/marble-maps/PositionMarker.qml
index d593be4..bb4196d 100644
--- a/src/apps/marble-maps/PositionMarker.qml
+++ b/src/apps/marble-maps/PositionMarker.qml
@@ -12,21 +12,28 @@
import QtQuick 2.3
import QtQuick.Window 2.2
-Rectangle {
+Item {
id: root
property alias angle: rotation.angle
property int posX: 0
property int posY: 0
+ property bool showAccuracy: true
+ property real radius: 100
x: posX - width * 0.5
y: posY - height * 0.5
width: radius
height: radius
- color: "#40ff0000"
- border.color: "#ff0000"
- border.width: 2
+
+ Rectangle {
+ anchors.fill: parent
+ color: "#40ff0000"
+ border.color: "#ff0000"
+ border.width: 2
+ radius: root.radius
+ }
Image {
id: image
diff --git a/src/lib/marble/declarative/Routing.cpp b/src/lib/marble/declarative/Routing.cpp
index 12fc7d0..5da902b 100644
--- a/src/lib/marble/declarative/Routing.cpp
+++ b/src/lib/marble/declarative/Routing.cpp
@@ -68,7 +68,6 @@ Routing::Routing( QQuickItem *parent) :
connect(d->m_routeRequestModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(updateWaypointItems()));
emit routeRequestModelChanged(d->m_routeRequestModel);
- update();
}
Routing::~Routing()
@@ -85,14 +84,14 @@ QSGNode * Routing::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) {
Marble::GeoPainter geoPainter(&paintDevice, d->m_marbleMap->viewport(), d->m_marbleMap->mapQuality());
RoutingManager const * const routingManager = d->m_marbleMap->model()->routingManager();
- GeoDataLineString const waypoints = routingManager->routingModel()->route().path();
+ GeoDataLineString const & waypoints = routingManager->routingModel()->route().path();
if (waypoints.isEmpty()) {
return 0;
}
int const dpi = qMax(paintDevice.logicalDpiX(), paintDevice.logicalDpiY());
- qreal const width = 2.5 * MM2M * M2IN * dpi - 4;
+ qreal const width = 2.5 * MM2M * M2IN * dpi;
QColor standardRouteColor = routingManager->state() == RoutingManager::Downloading ?
routingManager->routeColorStandard() :