From c03576000da714a73626f985e84b6084c9deb4fd Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 25 Jan 2017 20:07:27 +0100 Subject: 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 --- src/imports/location/qdeclarativegeomapitembase.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/imports') 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; } -- cgit v1.2.1