From a3bb5913a7644bb4280942117566ed1db1894e92 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 26 Sep 2022 16:13:57 +0300 Subject: [PATCH] Improve clicked animated emoji zoom. --- td/telegram/StickersManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index 9bd372583..b15d8dd03 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -2191,12 +2191,16 @@ tl_object_ptr StickersManager::get_sticker_object(FileId file_i double zoom = 1.0; if ((is_sticker_format_vector(sticker->format_) || sticker->type_ == StickerType::CustomEmoji) && (for_animated_emoji || for_clicked_animated_emoji)) { - zoom = for_clicked_animated_emoji ? 3 * animated_emoji_zoom_ : animated_emoji_zoom_; if (sticker->type_ == StickerType::CustomEmoji && max(width, height) <= 100) { zoom *= 5.12; } width = static_cast(width * zoom + 0.5); height = static_cast(height * zoom + 0.5); + if (for_clicked_animated_emoji) { + zoom *= 3; + width *= 3; + height *= 3; + } } auto premium_animation_object = sticker->premium_animation_file_id_.is_valid() ? td_->file_manager_->get_file_object(sticker->premium_animation_file_id_)