improve MapLocationDialog
This commit is contained in:
parent
eee9100d8b
commit
55186e8b88
1 changed files with 5 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue