From 32e8ae2b9e9d220186b69db858bf1b101f2c7712 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 28 Jul 2019 15:45:46 +0200 Subject: [PATCH] Fix sticker suggestions by emoji. Regression was introduced in 27f248645c. --- Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp index d9449ca35..5b14bd7a9 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp @@ -646,7 +646,7 @@ void FieldAutocompleteInner::paintEvent(QPaintEvent *e) { w = std::max(size.width(), 1); h = std::max(size.height(), 1); } else { - const auto coef = std::max( + const auto coef = std::min( std::min( (st::stickerPanSize.width() - st::buttonRadius * 2) / float64(document->dimensions.width()), (st::stickerPanSize.height() - st::buttonRadius * 2) / float64(document->dimensions.height())),