summaryrefslogtreecommitdiff
path: root/src/imports/location
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-01-25 20:07:27 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-01-26 14:45:51 +0000
commitc03576000da714a73626f985e84b6084c9deb4fd (patch)
tree04beb7556e2859949624a7c8e64d437532bef9cb /src/imports/location
parentc57d42b47004623db9b934d0688180ec6dc1a73e (diff)
downloadqtlocation-c03576000da714a73626f985e84b6084c9deb4fd.tar.gz
Change the Map items opacity ramp values
This patch changes the ramp values from being [2.0,3.0] to [1.5, 2.5]. These ranges are the ranges in which the opacity is linearly dimmed. Reducing this value allows items to be visible for half a zoom level more, easing debugging of items that have to be viewed at full map. Change-Id: I973e7bcac7ec6cfb545e9c68ffd8966b1203a9cf Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/imports/location')
-rw-r--r--src/imports/location/qdeclarativegeomapitembase.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/imports/location/qdeclarativegeomapitembase.cpp b/src/imports/location/qdeclarativegeomapitembase.cpp
index 8e25e853..d11902e9 100644
--- a/src/imports/location/qdeclarativegeomapitembase.cpp
+++ b/src/imports/location/qdeclarativegeomapitembase.cpp
@@ -187,15 +187,17 @@ void QDeclarativeGeoMapItemBase::setPositionOnMap(const QGeoCoordinate &coordina
setPosition(topLeft);
}
+static const double opacityRampMin = 1.5;
+static const double opacityRampMax = 2.5;
/*!
\internal
*/
float QDeclarativeGeoMapItemBase::zoomLevelOpacity() const
{
- if (quickMap_->zoomLevel() > 3.0)
+ if (quickMap_->zoomLevel() > opacityRampMax)
return 1.0;
- else if (quickMap_->zoomLevel() > 2.0)
- return quickMap_->zoomLevel() - 2.0;
+ else if (quickMap_->zoomLevel() > opacityRampMin)
+ return quickMap_->zoomLevel() - opacityRampMin;
else
return 0.0;
}