mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Fix glitches for transparent album preview parts.
This commit is contained in:
parent
af552fb4c0
commit
8ef9ec0567
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue