From 5468fde4920cd2bb1b3451bb993db4ebc0d8ca68 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 8 Oct 2025 11:51:41 +0300 Subject: [PATCH] Set profile top bar as flexible. --- Telegram/SourceFiles/info/info_wrap_widget.cpp | 1 + .../SourceFiles/info/profile/info_profile_inner_widget.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/info/info_wrap_widget.cpp b/Telegram/SourceFiles/info/info_wrap_widget.cpp index ae59c84cba..0b3182965a 100644 --- a/Telegram/SourceFiles/info/info_wrap_widget.cpp +++ b/Telegram/SourceFiles/info/info_wrap_widget.cpp @@ -65,6 +65,7 @@ const style::InfoTopBar &TopBarStyle(Wrap wrap) { [[nodiscard]] bool HasCustomTopBar(not_null controller) { const auto section = controller->section(); return (section.type() == Section::Type::BotStarRef) + || (section.type() == Section::Type::Profile) || ((section.type() == Section::Type::Settings) && section.settingsType()->hasCustomTopBar()); } diff --git a/Telegram/SourceFiles/info/profile/info_profile_inner_widget.cpp b/Telegram/SourceFiles/info/profile/info_profile_inner_widget.cpp index 473ea36de2..c45a4457a0 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_inner_widget.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_inner_widget.cpp @@ -326,12 +326,16 @@ int InnerWidget::resizeGetHeight(int newWidth) { } bool InnerWidget::hasFlexibleTopBar() const { - return false; + return true; } base::weak_qptr InnerWidget::createPinnedToTop( not_null parent) { const auto content = Ui::CreateChild(parent); + _controller->wrapValue( + ) | rpl::start_with_next([=](Wrap wrap) { + content->setRoundEdges(wrap == Wrap::Layer); + }, content->lifetime()); return base::make_weak(not_null{ content }); }