2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Added icon to language button in settings from intro.

This commit is contained in:
23rd
2023-11-04 13:41:50 +03:00
committed by John Preston
parent f4cfbc5ed8
commit a4e5ea01dc
3 changed files with 5 additions and 7 deletions

View File

@@ -272,8 +272,7 @@ void SetupPowerSavingButton(
void SetupLanguageButton(
not_null<Window::Controller*> window,
not_null<Ui::VerticalLayout*> container,
bool icon) {
not_null<Ui::VerticalLayout*> container) {
const auto button = AddButtonWithLabel(
container,
tr::lng_settings_language(),
@@ -282,8 +281,8 @@ void SetupLanguageButton(
) | rpl::then(
Lang::GetInstance().idChanges()
) | rpl::map([] { return Lang::GetInstance().nativeName(); }),
icon ? st::settingsButton : st::settingsButtonNoIcon,
{ icon ? &st::menuIconTranslate : nullptr });
st::settingsButton,
{ &st::menuIconTranslate });
const auto guard = Ui::CreateChild<base::binary_guard>(button.get());
button->addClickHandler([=] {
const auto m = button->clickModifiers();