From 2abc55e1d06eb106c0484df8dcc040bef8e42ce0 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 30 Jun 2026 12:11:35 +0400 Subject: [PATCH] Fade the clipped rich-draft preview bottom --- Telegram/SourceFiles/chat_helpers/chat_helpers.style | 1 + .../view/controls/history_view_rich_draft_preview.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/chat_helpers/chat_helpers.style b/Telegram/SourceFiles/chat_helpers/chat_helpers.style index 87d6c5b54f..fdfd3ef50b 100644 --- a/Telegram/SourceFiles/chat_helpers/chat_helpers.style +++ b/Telegram/SourceFiles/chat_helpers/chat_helpers.style @@ -1266,6 +1266,7 @@ historyComposeField: InputField(defaultInputField) { } historyComposeFieldMaxHeight: 224px; historyRichMessagePreviewHeight: 72px; +historyRichMessagePreviewFadeHeight: 40px; historyComposeFieldFadeHeight: 6px; historySendRight: 2px; historySendPadding: 9px; diff --git a/Telegram/SourceFiles/history/view/controls/history_view_rich_draft_preview.cpp b/Telegram/SourceFiles/history/view/controls/history_view_rich_draft_preview.cpp index bce5377286..e22f73ed6e 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_rich_draft_preview.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_rich_draft_preview.cpp @@ -219,7 +219,9 @@ void RichDraftPreview::paint(QRect clip) { || _fadePixmap.isNull()) { return; } - const auto fadeHeight = std::min(st::historyComposeFieldFadeHeight, height()); + const auto fadeHeight = std::min( + st::historyRichMessagePreviewFadeHeight, + height()); if (fadeHeight <= 0) { return; } @@ -311,7 +313,7 @@ void RichDraftPreview::refreshPaletteDependentCaches() { } void RichDraftPreview::regenerateFadePixmap() { - const auto height = st::historyComposeFieldFadeHeight; + const auto height = st::historyRichMessagePreviewFadeHeight; if (height <= 0) { _fadePixmap = QPixmap(); return;