mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-29 15:01:03 +00:00
Fix glitches for transparent album preview parts.
This commit is contained in:
parent
af552fb4c0
commit
8ef9ec0567
@ -81,17 +81,17 @@ bool PrepareAlbumMediaIsWaiting(
|
||||
if (const auto image = base::get_if<Image>(
|
||||
&file.information->media)) {
|
||||
if (ValidPhotoForAlbum(*image)) {
|
||||
file.preview = image->data.scaledToWidth(
|
||||
file.preview = Images::prepareOpaque(image->data.scaledToWidth(
|
||||
std::min(previewWidth, convertScale(image->data.width()))
|
||||
* cIntRetinaFactor(),
|
||||
Qt::SmoothTransformation);
|
||||
Qt::SmoothTransformation));
|
||||
file.preview.setDevicePixelRatio(cRetinaFactor());
|
||||
file.type = PreparedFile::AlbumType::Photo;
|
||||
}
|
||||
} else if (const auto video = base::get_if<Video>(
|
||||
&file.information->media)) {
|
||||
if (ValidVideoForAlbum(*video)) {
|
||||
auto blurred = Images::prepareBlur(video->thumbnail);
|
||||
auto blurred = Images::prepareBlur(Images::prepareOpaque(video->thumbnail));
|
||||
file.preview = std::move(blurred).scaledToWidth(
|
||||
previewWidth * cIntRetinaFactor(),
|
||||
Qt::SmoothTransformation);
|
||||
|
Loading…
Reference in New Issue
Block a user