2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Use sizes like iOS for premium sticker effects.

This commit is contained in:
John Preston
2022-06-08 19:00:48 +04:00
parent 17b2d043cb
commit 7ba997259c
4 changed files with 11 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace {
constexpr auto kPremiumShift = 0.082;
constexpr auto kPremiumShift = 21. / 240;
constexpr auto kShiftDuration = crl::time(200);
constexpr auto kReactionsPerRow = 5;
constexpr auto kDisabledOpacity = 0.5;
@@ -201,7 +201,9 @@ void PreloadSticker(const std::shared_ptr<Data::DocumentMedia> &media) {
// : 1;
p.drawImage(r, frame.image);
p.drawImage(result->rect(), effect.image);
p.drawImage(
QRect(QPoint(), effect.image.size() / factor),
effect.image);
if (!frame.image.isNull()/*
&& ((frame.index % effectsCount) <= effect.index)*/) {