From 33b1e179d3c8d3d3a49fbcaaf692a923c3852704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 29 Aug 2017 15:31:12 +0200 Subject: [PATCH] Use the correct DPI value for zooming --- src/pathview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pathview.cpp b/src/pathview.cpp index 50dcb172..d367c951 100644 --- a/src/pathview.cpp +++ b/src/pathview.cpp @@ -3,7 +3,6 @@ #include #include #include -#include "config.h" #include "opengl.h" #include "misc.h" #include "poi.h" @@ -499,7 +498,8 @@ void PathView::plot(QPainter *painter, const QRectF &target, bool hires) origLL = _map->xy2ll(origScene); origRes = _map->resolution(origScene); - qreal r = painter->device()->logicalDpiX() / SCREEN_DPI; + qreal r = painter->device()->logicalDpiX() + / (qreal)metric(QPaintDevice::PdmDpiX); adj.setSize(QSize(adj.width() * r, adj.height() * r)); _map->zoomFit(adj.size(), _tr | _rr | _wr); rescale();