2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-18 14:00:09 +00:00

Simplify Image, remove ImageSource.

This commit is contained in:
John Preston
2020-05-29 19:10:25 +04:00
parent d0c78eaddd
commit 36fbdfb380
49 changed files with 306 additions and 512 deletions

View File

@@ -788,8 +788,8 @@ void StickersListWidget::Footer::paintSetIcon(
|| (!icon.lottie->ready() && !icon.savedFrame.isNull())) {
const auto pixmap = !icon.savedFrame.isNull()
? icon.savedFrame
: (!icon.lottie && thumb && thumb->loaded())
? thumb->pix(origin, icon.pixw, icon.pixh)
: (!icon.lottie && thumb)
? thumb->pix(icon.pixw, icon.pixh)
: QPixmap();
if (pixmap.isNull()) {
return;
@@ -1866,9 +1866,8 @@ void StickersListWidget::paintSticker(Painter &p, Set &set, int y, int section,
const auto image = media->getStickerSmall();
const auto pixmap = !sticker.savedFrame.isNull()
? sticker.savedFrame
: (image && image->loaded())
: image
? image->pixSingle(
document->stickerSetOrigin(),
w,
h,
w,