From 6791fb851f8dabcc4e052ae2647a3ecdcb3c8a02 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 27 Apr 2026 12:52:36 +0300 Subject: [PATCH] Dropped top padding of first sticker section under shortcut strip. --- Telegram/SourceFiles/chat_helpers/chat_helpers.style | 1 + Telegram/SourceFiles/chat_helpers/emoji_list_widget.cpp | 8 +++++++- .../SourceFiles/chat_helpers/stickers_list_widget.cpp | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) 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) {