mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
AddDivider(result);
|
||||||
AddSkip(result);
|
AddSkip(result);
|
||||||
SetupLanguageButton(window, result, false);
|
SetupLanguageButton(window, result);
|
||||||
SetupConnectionType(window, &window->account(), result);
|
SetupConnectionType(window, &window->account(), result);
|
||||||
AddSkip(result);
|
AddSkip(result);
|
||||||
if (HasUpdate()) {
|
if (HasUpdate()) {
|
||||||
|
|
|
@ -272,8 +272,7 @@ void SetupPowerSavingButton(
|
||||||
|
|
||||||
void SetupLanguageButton(
|
void SetupLanguageButton(
|
||||||
not_null<Window::Controller*> window,
|
not_null<Window::Controller*> window,
|
||||||
not_null<Ui::VerticalLayout*> container,
|
not_null<Ui::VerticalLayout*> container) {
|
||||||
bool icon) {
|
|
||||||
const auto button = AddButtonWithLabel(
|
const auto button = AddButtonWithLabel(
|
||||||
container,
|
container,
|
||||||
tr::lng_settings_language(),
|
tr::lng_settings_language(),
|
||||||
|
@ -282,8 +281,8 @@ void SetupLanguageButton(
|
||||||
) | rpl::then(
|
) | rpl::then(
|
||||||
Lang::GetInstance().idChanges()
|
Lang::GetInstance().idChanges()
|
||||||
) | rpl::map([] { return Lang::GetInstance().nativeName(); }),
|
) | rpl::map([] { return Lang::GetInstance().nativeName(); }),
|
||||||
icon ? st::settingsButton : st::settingsButtonNoIcon,
|
st::settingsButton,
|
||||||
{ icon ? &st::menuIconTranslate : nullptr });
|
{ &st::menuIconTranslate });
|
||||||
const auto guard = Ui::CreateChild<base::binary_guard>(button.get());
|
const auto guard = Ui::CreateChild<base::binary_guard>(button.get());
|
||||||
button->addClickHandler([=] {
|
button->addClickHandler([=] {
|
||||||
const auto m = button->clickModifiers();
|
const auto m = button->clickModifiers();
|
||||||
|
|
|
@ -22,8 +22,7 @@ namespace Settings {
|
||||||
|
|
||||||
void SetupLanguageButton(
|
void SetupLanguageButton(
|
||||||
not_null<Window::Controller*> window,
|
not_null<Window::Controller*> window,
|
||||||
not_null<Ui::VerticalLayout*> container,
|
not_null<Ui::VerticalLayout*> container);
|
||||||
bool icon = true);
|
|
||||||
bool HasInterfaceScale();
|
bool HasInterfaceScale();
|
||||||
void SetupInterfaceScale(
|
void SetupInterfaceScale(
|
||||||
not_null<Window::Controller*> window,
|
not_null<Window::Controller*> window,
|
||||||
|
|
Loading…
Add table
Reference in a new issue