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

Removed AddButton and CreateButton without icon from Settings.

This commit is contained in:
23rd
2023-11-14 23:59:21 +03:00
parent f6cb9072d2
commit f629bf76ff
40 changed files with 173 additions and 171 deletions

View File

@@ -51,13 +51,13 @@ void AddOption(
option.defaultValue()
) | rpl::start_to_stream(*toggles, lifetime);
const auto button = AddButton(
const auto button = container->add(object_ptr<Button>(
container,
rpl::single(name),
(option.relevant()
? st::settingsButtonNoIcon
: st::settingsOptionDisabled)
)->toggleOn(toggles->events_starting_with(option.value()));
))->toggleOn(toggles->events_starting_with(option.value()));
const auto restarter = (option.relevant() && option.restartRequired())
? button->lifetime().make_state<base::Timer>()
@@ -115,10 +115,10 @@ void SetupExperimental(
const auto inner = wrap->entity();
Ui::AddDivider(inner);
Ui::AddSkip(inner, st::settingsCheckboxesSkip);
reset = AddButton(
reset = inner->add(object_ptr<Button>(
inner,
tr::lng_settings_experimental_restore(),
st::settingsButtonNoIcon);
st::settingsButtonNoIcon));
reset->addClickHandler([=] {
base::options::reset();
wrap->hide(anim::type::normal);