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