mirror of https://github.com/procxx/kepka.git
Use animated emoji size for the Dice.
This commit is contained in:
parent
0c2d8f1b6e
commit
fc5dbc6003
|
@ -59,18 +59,18 @@ bool Sticker::isEmojiSticker() const {
|
||||||
|
|
||||||
void Sticker::initSize() {
|
void Sticker::initSize() {
|
||||||
_size = _document->dimensions;
|
_size = _document->dimensions;
|
||||||
if (isEmojiSticker()) {
|
if (isEmojiSticker() || _diceIndex >= 0) {
|
||||||
constexpr auto kIdealStickerSize = 512;
|
constexpr auto kIdealStickerSize = 512;
|
||||||
const auto zoom = GetEmojiStickerZoom(&_document->session());
|
const auto zoom = GetEmojiStickerZoom(&_document->session());
|
||||||
const auto convert = [&](int size) {
|
const auto convert = [&](int size) {
|
||||||
return int(size * st::maxStickerSize * zoom / kIdealStickerSize);
|
return int(size * st::maxStickerSize * zoom / kIdealStickerSize);
|
||||||
};
|
};
|
||||||
_size = QSize(convert(_size.width()), convert(_size.height()));
|
_size = QSize(convert(_size.width()), convert(_size.height()));
|
||||||
|
[[maybe_unused]] bool result = readyToDrawLottie();
|
||||||
} else {
|
} else {
|
||||||
_size = DownscaledSize(
|
_size = DownscaledSize(
|
||||||
_size,
|
_size,
|
||||||
{ st::maxStickerSize, st::maxStickerSize });
|
{ st::maxStickerSize, st::maxStickerSize });
|
||||||
[[maybe_unused]] bool result = readyToDrawLottie();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue