Render context art at correct size

This commit is contained in:
Fletcher Dostie 2023-03-28 03:21:26 -07:00 committed by Jonas Kvinge
parent b741f1a580
commit e4697c8ff1
2 changed files with 2 additions and 1 deletions

View File

@ -182,7 +182,7 @@ void ContextAlbum::DrawImage(QPainter *p, const QPixmap &pixmap, const qreal opa
if (qFuzzyCompare(opacity, static_cast<qreal>(0.0))) return;
p->setOpacity(opacity);
p->drawPixmap(0, 0, pixmap.width(), pixmap.height(), pixmap);
p->drawPixmap(0, 0, pixmap.width() / pixmap.devicePixelRatioF(), pixmap.height() / pixmap.devicePixelRatioF(), pixmap);
}

View File

@ -165,6 +165,7 @@ QImage ImageUtils::ScaleAndPad(const QImage &image, const bool scale, const bool
image_scaled = image_padded;
}
image_scaled.setDevicePixelRatio(device_pixel_ratio);
return image_scaled;
}