Fix blurred document thumbnails.

This commit is contained in:
John Preston 2019-07-04 12:22:07 +02:00
parent 729da4a6b4
commit c8b61366d3
1 changed files with 5 additions and 2 deletions

View File

@ -243,8 +243,11 @@ void HistoryDocument::draw(Painter &p, const QRect &r, TextSelection selection,
if (const auto normal = _data->thumbnail()) {
if (normal->loaded()) {
thumb = normal->pixSingle(_realParent->fullId(), thumbed->_thumbw, 0, st::msgFileThumbSize, st::msgFileThumbSize, roundRadius);
} else if (const auto blurred = _data->thumbnailInline()) {
thumb = blurred->pixBlurredSingle(_realParent->fullId(), thumbed->_thumbw, 0, st::msgFileThumbSize, st::msgFileThumbSize, roundRadius);
} else {
_data->loadThumbnail(_realParent->fullId());
if (const auto blurred = _data->thumbnailInline()) {
thumb = blurred->pixBlurredSingle(_realParent->fullId(), thumbed->_thumbw, 0, st::msgFileThumbSize, st::msgFileThumbSize, roundRadius);
}
}
}
p.drawPixmap(rthumb.topLeft(), thumb);