mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 19:55:53 +01:00
Use the correct DPI value for zooming
This commit is contained in:
parent
5efb9f8a4e
commit
33b1e179d3
@ -3,7 +3,6 @@
|
|||||||
#include <QWheelEvent>
|
#include <QWheelEvent>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QPixmapCache>
|
#include <QPixmapCache>
|
||||||
#include "config.h"
|
|
||||||
#include "opengl.h"
|
#include "opengl.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "poi.h"
|
#include "poi.h"
|
||||||
@ -499,7 +498,8 @@ void PathView::plot(QPainter *painter, const QRectF &target, bool hires)
|
|||||||
origLL = _map->xy2ll(origScene);
|
origLL = _map->xy2ll(origScene);
|
||||||
origRes = _map->resolution(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));
|
adj.setSize(QSize(adj.width() * r, adj.height() * r));
|
||||||
_map->zoomFit(adj.size(), _tr | _rr | _wr);
|
_map->zoomFit(adj.size(), _tr | _rr | _wr);
|
||||||
rescale();
|
rescale();
|
||||||
|
Loading…
Reference in New Issue
Block a user