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

@@ -1178,12 +1178,12 @@ void LanguageBox::setupTop(not_null<Ui::VerticalLayout*> container) {
if (!_controller) {
return;
}
const auto translateEnabled = Settings::AddButton(
container,
tr::lng_translate_settings_show(),
st::settingsButtonNoIcon
)->toggleOn(
rpl::single(Core::App().settings().translateButtonEnabled()));
const auto translateEnabled = container->add(
object_ptr<Ui::SettingsButton>(
container,
tr::lng_translate_settings_show(),
st::settingsButtonNoIcon))->toggleOn(
rpl::single(Core::App().settings().translateButtonEnabled()));
translateEnabled->toggledValue(
) | rpl::filter([](bool checked) {
@@ -1195,11 +1195,11 @@ void LanguageBox::setupTop(not_null<Ui::VerticalLayout*> container) {
using namespace rpl::mappers;
auto premium = Data::AmPremiumValue(&_controller->session());
const auto translateChat = Settings::AddButton(
const auto translateChat = container->add(object_ptr<Ui::SettingsButton>(
container,
tr::lng_translate_settings_chat(),
st::settingsButtonNoIconLocked
)->toggleOn(rpl::merge(
))->toggleOn(rpl::merge(
rpl::combine(
Core::App().settings().translateChatEnabledValue(),
rpl::duplicate(premium),