Fix document thumbnails on Retina screens.

This commit is contained in:
John Preston 2022-01-31 13:18:52 +03:00
parent eb784c665a
commit 17de379145
2 changed files with 2 additions and 1 deletions

View File

@ -577,7 +577,7 @@ void BackgroundRow::updateImage() {
if (inverted) { if (inverted) {
small = Ui::InvertPatternImage(std::move(small)); small = Ui::InvertPatternImage(std::move(small));
} }
p.drawImage(QRect(0, 0, size, size), small); p.drawImage(QRect(0, 0, fullsize, fullsize), small);
}; };
return Ui::GenerateBackgroundImage( return Ui::GenerateBackgroundImage(
{ fullsize, fullsize }, { fullsize, fullsize },

View File

@ -352,6 +352,7 @@ const QPixmap &Image::cached(
w = width(); w = width();
} else if (h <= 0) { } else if (h <= 0) {
h = std::max(int(int64(height()) * w / width()), 1) * ratio; h = std::max(int(int64(height()) * w / width()), 1) * ratio;
w *= ratio;
} else { } else {
w *= ratio; w *= ratio;
h *= ratio; h *= ratio;