mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Added icon to language button in settings from intro.
This commit is contained in:
parent
f4cfbc5ed8
commit
a4e5ea01dc
3 changed files with 5 additions and 7 deletions
|
@ -63,7 +63,7 @@ object_ptr<Ui::RpWidget> CreateIntroSettings(
|
|||
|
||||
AddDivider(result);
|
||||
AddSkip(result);
|
||||
SetupLanguageButton(window, result, false);
|
||||
SetupLanguageButton(window, result);
|
||||
SetupConnectionType(window, &window->account(), result);
|
||||
AddSkip(result);
|
||||
if (HasUpdate()) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -22,8 +22,7 @@ namespace Settings {
|
|||
|
||||
void SetupLanguageButton(
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
bool icon = true);
|
||||
not_null<Ui::VerticalLayout*> container);
|
||||
bool HasInterfaceScale();
|
||||
void SetupInterfaceScale(
|
||||
not_null<Window::Controller*> window,
|
||||
|
|
Loading…
Add table
Reference in a new issue