From 93ff0bdcffe6691d63af44c20ed745a104552c7c Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 9 Sep 2024 12:25:35 +0300 Subject: [PATCH] Slightly improved style of box for sending GIF with caption. --- Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp | 5 ++++- Telegram/SourceFiles/chat_helpers/chat_helpers.style | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp b/Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp index 9eec6b4a4..3ee0ac3c4 100644 --- a/Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp +++ b/Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp @@ -129,7 +129,9 @@ namespace { not_null controller) { using Limit = HistoryView::Controls::CharactersLimitLabel; - const auto wrap = box->verticalLayout()->add( + const auto bottomContainer = box->setPinnedToBottomContent( + object_ptr(box)); + const auto wrap = bottomContainer->add( object_ptr(box), st::boxRowPadding); const auto input = Ui::CreateChild( @@ -233,6 +235,7 @@ void SendGifWithCaptionBox( } box->setTitle(tr::lng_send_gif_with_caption()); box->setWidth(st::boxWidth); + box->getDelegate()->setStyle(st::sendGifBox); const auto container = box->verticalLayout(); [[maybe_unused]] const auto gifWidget = AddGifWidget( diff --git a/Telegram/SourceFiles/chat_helpers/chat_helpers.style b/Telegram/SourceFiles/chat_helpers/chat_helpers.style index 42be4499d..92a8132ce 100644 --- a/Telegram/SourceFiles/chat_helpers/chat_helpers.style +++ b/Telegram/SourceFiles/chat_helpers/chat_helpers.style @@ -1505,3 +1505,7 @@ pickLocationChooseOnMap: RoundButton(defaultActiveButton) { font: font(15px semibold); } } + +sendGifBox: Box(defaultBox) { + shadowIgnoreBottomSkip: true; +}