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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user