/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "ui/vertical_list.h" #include "ui/text/text_utilities.h" #include "ui/widgets/box_content_divider.h" #include "ui/widgets/labels.h" #include "ui/wrap/padding_wrap.h" #include "ui/wrap/vertical_layout.h" #include "styles/style_layers.h" namespace Ui { void AddSkip(not_null container) { AddSkip(container, st::defaultVerticalListSkip); } void AddSkip(not_null container, int skip) { container->add(object_ptr(container, skip)); } void AddDivider(not_null container) { container->add(object_ptr(container)); } void AddDividerText( not_null container, rpl::producer text) { AddDividerText(container, std::move(text) | Ui::Text::ToWithEntities()); } void AddDividerText( not_null container, rpl::producer text) { container->add(object_ptr( container, object_ptr( container, std::move(text), st::boxDividerLabel), st::defaultBoxDividerLabelPadding)); } not_null AddSubsectionTitle( not_null container, rpl::producer text, style::margins addPadding, const style::FlatLabel *st) { return container->add( object_ptr( container, std::move(text), st ? *st : st::defaultSubsectionTitle), st::defaultSubsectionTitlePadding + addPadding); } } // namespace Ui