mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 12:00:48 +00:00
Added ability to provide custom style to Settings::AddSubsectionTitle.
This commit is contained in:
parent
e8f0be80bb
commit
d1bb87ccec
@ -272,16 +272,11 @@ void StartRtmpProcess::FillRtmpRows(
|
||||
};
|
||||
|
||||
// Server URL.
|
||||
{
|
||||
// Settings::AddSubsectionTitle
|
||||
container->add(
|
||||
object_ptr<Ui::FlatLabel>(
|
||||
Settings::AddSubsectionTitle(
|
||||
container,
|
||||
tr::lng_group_call_rtmp_url_subtitle(),
|
||||
*subsectionTitleStyle),
|
||||
st::settingsSubsectionTitlePadding
|
||||
+ st::groupCallRtmpSubsectionTitleAddPadding);
|
||||
}
|
||||
st::groupCallRtmpSubsectionTitleAddPadding,
|
||||
subsectionTitleStyle);
|
||||
|
||||
auto urlLabelContent = state->url.value();
|
||||
addLabel(std::move(urlLabelContent), *labelStyle);
|
||||
@ -300,16 +295,11 @@ void StartRtmpProcess::FillRtmpRows(
|
||||
container,
|
||||
st::groupCallRtmpKeySubsectionTitleSkip));
|
||||
|
||||
{
|
||||
// Settings::AddSubsectionTitle
|
||||
container->add(
|
||||
object_ptr<Ui::FlatLabel>(
|
||||
Settings::AddSubsectionTitle(
|
||||
container,
|
||||
tr::lng_group_call_rtmp_key_subtitle(),
|
||||
*subsectionTitleStyle),
|
||||
st::settingsSubsectionTitlePadding
|
||||
+ st::groupCallRtmpSubsectionTitleAddPadding);
|
||||
}
|
||||
st::groupCallRtmpSubsectionTitleAddPadding,
|
||||
subsectionTitleStyle);
|
||||
|
||||
auto keyLabelContent = rpl::combine(
|
||||
state->hidden.value(),
|
||||
|
@ -243,12 +243,13 @@ not_null<Button*> AddButtonWithLabel(
|
||||
not_null<Ui::FlatLabel*> AddSubsectionTitle(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
rpl::producer<QString> text,
|
||||
style::margins addPadding) {
|
||||
style::margins addPadding,
|
||||
const style::FlatLabel *st) {
|
||||
return container->add(
|
||||
object_ptr<Ui::FlatLabel>(
|
||||
container,
|
||||
std::move(text),
|
||||
st::settingsSubsectionTitle),
|
||||
st ? *st : st::settingsSubsectionTitle),
|
||||
st::settingsSubsectionTitlePadding + addPadding);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@ class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace style {
|
||||
struct FlatLabel;
|
||||
struct SettingsButton;
|
||||
} // namespace style
|
||||
|
||||
@ -141,7 +142,8 @@ void CreateRightLabel(
|
||||
not_null<Ui::FlatLabel*> AddSubsectionTitle(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
rpl::producer<QString> text,
|
||||
style::margins addPadding = {});
|
||||
style::margins addPadding = {},
|
||||
const style::FlatLabel *st = nullptr);
|
||||
|
||||
using MenuCallback = Fn<QAction*(
|
||||
const QString &text,
|
||||
|
Loading…
Reference in New Issue
Block a user