2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added ability to provide custom style to Settings::AddSubsectionTitle.

This commit is contained in:
23rd
2022-03-01 08:22:56 +03:00
parent e8f0be80bb
commit d1bb87ccec
3 changed files with 16 additions and 23 deletions

View File

@@ -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);
}

View File

@@ -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,