fix: a bunch of useful fixes

This commit is contained in:
AlexeyZavar
2024-07-02 22:06:56 +03:00
parent c4e1e8415c
commit a851bebc75
10 changed files with 60 additions and 17 deletions
@@ -63,6 +63,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
// AyuGram includes
#include "ayu/utils/telegram_helpers.h"
#include "styles/style_ayu_styles.h"
#include "window/window_session_controller.h"
#include "data/data_user.h"
@@ -1392,6 +1393,18 @@ void StickerSetBox::Inner::paintSticker(
(_singleSize.width() - size.width()) / 2,
(_singleSize.height() - size.height()) / 2);
auto lottieFrame = QImage();
if (sticker->setType == Data::StickersType::Stickers) {
QPainterPath path;
path.addRoundedRect(QRectF(ppos, size), st::stickerRoundingSize, st::stickerRoundingSize);
p.save();
p.setRenderHint(QPainter::Antialiasing, true);
p.setClipPath(path);
p.setRenderHint(QPainter::Antialiasing, false);
}
if (element.emoji) {
element.emoji->paint(p, {
.textColor = st::windowFg->c,
@@ -1425,6 +1438,11 @@ void StickerSetBox::Inner::paintSticker(
QRect(ppos, size),
_pathGradient.get());
}
if (sticker->setType == Data::StickersType::Stickers) {
p.restore();
}
if (premium) {
_premiumMark.paint(
p,