diff --git a/MapLocationDialog.cpp b/MapLocationDialog.cpp index 77a32fb..12c5907 100644 --- a/MapLocationDialog.cpp +++ b/MapLocationDialog.cpp @@ -61,9 +61,11 @@ MapLocationDialog::~MapLocationDialog() void MapLocationDialog::drawPointOnMap(double xpos_d, double ypos_d) { qreal screenRatio = AppEnv::screenRatio(); - int pointMakerSize = 8 * screenRatio; + qreal screenRatioPR = AppEnv::screenRatioPR(); + int pointMakerSize = 8 * screenRatio * screenRatioPR; QPixmap pointMakerPixmap = IconLoader::loadingPointmakerIcon().pixmap(QSize(pointMakerSize, pointMakerSize)); - QSize mapPixelSize = size(); + pointMakerPixmap.setDevicePixelRatio(screenRatioPR); + QSize mapPixelSize = QSize(width() * screenRatioPR, height() * screenRatioPR); int pointMakerHalfSize = pointMakerSize / 2; long xpos_ms = qRound(xpos_d); @@ -82,6 +84,7 @@ void MapLocationDialog::drawPointOnMap(double xpos_d, double ypos_d) mapPainter.drawPixmap(0, 0, mapPixelSize.width(), mapPixelSize.height(), QPixmap(":/img/mappreview.jpg").scaled(mapPixelSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); mapPainter.drawPixmap(xpos_pr, mapPixelSize.height() - ypos_pr, pointMakerSize, pointMakerSize, pointMakerPixmap); mapPainter.end(); + mapPixmap.setDevicePixelRatio(screenRatioPR); QPalette backgroundPalette; backgroundPalette.setBrush(backgroundRole(), QBrush(mapPixmap));