diff --git a/Telegram/SourceFiles/chat_helpers/chat_helpers.style b/Telegram/SourceFiles/chat_helpers/chat_helpers.style index 84844e7686..1b45f2ea99 100644 --- a/Telegram/SourceFiles/chat_helpers/chat_helpers.style +++ b/Telegram/SourceFiles/chat_helpers/chat_helpers.style @@ -622,6 +622,7 @@ stickerPanRemoveSet: IconButton(hashtagClose) { stickerIconMove: 400; stickerPreviewDuration: 150; stickerPreviewMin: 0.1; +stickerPanFirstAfterShortcutsSkip: 4px; mediaPreviewPhotoSkip: 48px; emojiPanColorAll: IconButton(stickerPanRemoveSet) { diff --git a/Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp b/Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp index 69d685a5a4..b3b0e354b2 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp @@ -1593,8 +1593,14 @@ bool EmojiListWidget::enumerateSections(Callback callback) const { info.rowsCount = info.collapsed ? kCollapsedRows : (info.count + _columnCount - 1) / _columnCount; + const auto firstAfterShortcuts = !i + && searchShortcutsShown() + && !searchShortcutSelected(); info.rowsTop = info.top - + (i == 0 ? _rowsTop : st().header); + + (i == 0 ? _rowsTop : st().header) + + (firstAfterShortcuts + ? st::stickerPanFirstAfterShortcutsSkip + : 0); info.rowsBottom = info.rowsTop + (info.rowsCount * _singleSize.height()); if (!callback(info)) { diff --git a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp index c366ffe58f..1f59a650ee 100644 --- a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp @@ -504,10 +504,15 @@ bool StickersListWidget::enumerateSections(Callback callback) const { auto &set = sets[i]; info.section = i; info.count = set.stickers.size(); + const auto firstAfterShortcuts = !i + && searchShortcutsShown() + && !searchShortcutSelected(); const auto titleSkip = set.externalLayout ? st::stickersTrendingHeader : setHasTitle(set) ? st().header + : firstAfterShortcuts + ? st::stickerPanFirstAfterShortcutsSkip : st::stickerPanPadding; info.rowsTop = info.top + titleSkip; if (set.externalLayout) {