diff --git a/src/core/qgsquick/qgsquickelevationprofilecanvas.cpp b/src/core/qgsquick/qgsquickelevationprofilecanvas.cpp index 63331eef08..4b9150b274 100644 --- a/src/core/qgsquick/qgsquickelevationprofilecanvas.cpp +++ b/src/core/qgsquick/qgsquickelevationprofilecanvas.cpp @@ -104,7 +104,7 @@ class QgsElevationProfilePlotItem : public Qgs2DPlot // force immediate recalculation of plot area QgsRenderContext context; - context.setScaleFactor( ( mCanvas->window()->screen()->logicalDotsPerInch() * mCanvas->window()->screen()->devicePixelRatio() ) / 25.4 ); + context.setScaleFactor( ( mCanvas->window()->screen()->physicalDotsPerInch() * mCanvas->window()->screen()->devicePixelRatio() ) / 25.4 ); calculateOptimisedIntervals( context ); mPlotArea = interiorPlotArea( context ); @@ -290,7 +290,7 @@ void QgsQuickElevationProfileCanvas::refresh() connect( mCurrentJob, &QgsProfilePlotRenderer::generationFinished, this, &QgsQuickElevationProfileCanvas::generationFinished ); QgsProfileGenerationContext generationContext; - generationContext.setDpi( window()->screen()->logicalDotsPerInch() * window()->screen()->devicePixelRatio() ); + generationContext.setDpi( window()->screen()->physicalDotsPerInch() * window()->screen()->devicePixelRatio() ); generationContext.setMaximumErrorMapUnits( MAX_ERROR_PIXELS * ( mProfileCurve.get()->length() ) / mPlotItem->plotArea().width() ); generationContext.setMapUnitsPerDistancePixel( mProfileCurve.get()->length() / mPlotItem->plotArea().width() ); mCurrentJob->setContext( generationContext ); @@ -449,7 +449,7 @@ void QgsQuickElevationProfileCanvas::refineResults() if ( mCurrentJob ) { QgsProfileGenerationContext context; - context.setDpi( window()->screen()->logicalDotsPerInch() * window()->screen()->devicePixelRatio() ); + context.setDpi( window()->screen()->physicalDotsPerInch() * window()->screen()->devicePixelRatio() ); const double plotDistanceRange = mPlotItem->xMaximum() - mPlotItem->xMinimum(); const double plotElevationRange = mPlotItem->yMaximum() - mPlotItem->yMinimum(); const double plotDistanceUnitsPerPixel = plotDistanceRange / mPlotItem->plotArea().width(); diff --git a/src/core/qgsquick/qgsquickmapcanvasmap.cpp b/src/core/qgsquick/qgsquickmapcanvasmap.cpp index bd128b90a7..dcd6f62e7f 100644 --- a/src/core/qgsquick/qgsquickmapcanvasmap.cpp +++ b/src/core/qgsquick/qgsquickmapcanvasmap.cpp @@ -280,7 +280,7 @@ void QgsQuickMapCanvasMap::onScreenChanged( QScreen *screen ) { mMapSettings->setDevicePixelRatio( screen->devicePixelRatio() ); } - mMapSettings->setOutputDpi( screen->logicalDotsPerInch() ); + mMapSettings->setOutputDpi( screen->physicalDotsPerInch() ); } }