mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-05 11:24:21 +00:00
Set profile top bar as flexible.
This commit is contained in:
@@ -65,6 +65,7 @@ const style::InfoTopBar &TopBarStyle(Wrap wrap) {
|
||||
[[nodiscard]] bool HasCustomTopBar(not_null<const Controller*> 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());
|
||||
}
|
||||
|
||||
@@ -326,12 +326,16 @@ int InnerWidget::resizeGetHeight(int newWidth) {
|
||||
}
|
||||
|
||||
bool InnerWidget::hasFlexibleTopBar() const {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
base::weak_qptr<Ui::RpWidget> InnerWidget::createPinnedToTop(
|
||||
not_null<Ui::RpWidget*> parent) {
|
||||
const auto content = Ui::CreateChild<TopBar>(parent);
|
||||
_controller->wrapValue(
|
||||
) | rpl::start_with_next([=](Wrap wrap) {
|
||||
content->setRoundEdges(wrap == Wrap::Layer);
|
||||
}, content->lifetime());
|
||||
return base::make_weak(not_null<Ui::RpWidget*>{ content });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user