fix: image blurry on Hi-DPI devices
This commit is contained in:
parent
cc7d58d4ec
commit
d535dedf60
|
@ -60,11 +60,12 @@ void GraphicsView::showFileFromPath(const QString &filePath, bool doRequestGalle
|
||||||
doRequestGallery = false;
|
doRequestGallery = false;
|
||||||
showText(tr("Image data is invalid or currently unsupported"));
|
showText(tr("Image data is invalid or currently unsupported"));
|
||||||
} else {
|
} else {
|
||||||
const QPixmap & pixmap = QPixmap::fromImageReader(&imageReader);
|
QPixmap && pixmap = QPixmap::fromImageReader(&imageReader);
|
||||||
if (pixmap.isNull()) {
|
if (pixmap.isNull()) {
|
||||||
doRequestGallery = false;
|
doRequestGallery = false;
|
||||||
showText(tr("Image data is invalid or currently unsupported"));
|
showText(tr("Image data is invalid or currently unsupported"));
|
||||||
} else {
|
} else {
|
||||||
|
pixmap.setDevicePixelRatio(devicePixelRatioF());
|
||||||
showImage(pixmap);
|
showImage(pixmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user