2023-11-14 22:12:53 +03:00
|
|
|
/*
|
|
|
|
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
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2024-02-20 14:33:46 +04:00
|
|
|
#include "ui/rect_part.h"
|
|
|
|
|
2023-11-14 22:12:53 +03:00
|
|
|
namespace style {
|
|
|
|
struct FlatLabel;
|
|
|
|
} // namespace style
|
|
|
|
|
2024-02-18 00:25:40 +04:00
|
|
|
namespace st {
|
|
|
|
extern const style::margins &defaultBoxDividerLabelPadding;
|
|
|
|
} // namespace st
|
|
|
|
|
2023-11-14 22:12:53 +03:00
|
|
|
namespace Ui {
|
|
|
|
|
|
|
|
class FlatLabel;
|
|
|
|
class VerticalLayout;
|
|
|
|
|
|
|
|
void AddSkip(not_null<Ui::VerticalLayout*> container);
|
|
|
|
void AddSkip(not_null<Ui::VerticalLayout*> container, int skip);
|
|
|
|
void AddDivider(not_null<Ui::VerticalLayout*> container);
|
2024-07-25 18:08:22 +02:00
|
|
|
not_null<Ui::FlatLabel*> AddDividerText(
|
2023-11-14 22:12:53 +03:00
|
|
|
not_null<Ui::VerticalLayout*> container,
|
2024-02-18 00:25:40 +04:00
|
|
|
rpl::producer<QString> text,
|
2024-02-20 14:33:46 +04:00
|
|
|
const style::margins &margins = st::defaultBoxDividerLabelPadding,
|
|
|
|
RectParts parts = RectPart::Top | RectPart::Bottom);
|
2024-07-25 18:08:22 +02:00
|
|
|
not_null<Ui::FlatLabel*> AddDividerText(
|
2023-12-08 10:37:37 +04:00
|
|
|
not_null<Ui::VerticalLayout*> container,
|
2024-02-18 00:25:40 +04:00
|
|
|
rpl::producer<TextWithEntities> text,
|
2024-02-20 14:33:46 +04:00
|
|
|
const style::margins &margins = st::defaultBoxDividerLabelPadding,
|
|
|
|
RectParts parts = RectPart::Top | RectPart::Bottom);
|
2023-11-14 22:12:53 +03:00
|
|
|
not_null<Ui::FlatLabel*> AddSubsectionTitle(
|
|
|
|
not_null<Ui::VerticalLayout*> container,
|
|
|
|
rpl::producer<QString> text,
|
|
|
|
style::margins addPadding = {},
|
|
|
|
const style::FlatLabel *st = nullptr);
|
|
|
|
|
|
|
|
} // namespace Ui
|