Allow custom lang loading using Alt+Shift+Click.

This commit is contained in:
John Preston 2018-09-27 17:27:31 +03:00
parent 9b449a1d26
commit fdfc767930

View file

@ -37,7 +37,12 @@ void SetupLanguageButton(
icon ? &st::settingsIconLanguage : nullptr);
const auto guard = Ui::AttachAsChild(button, base::binary_guard());
button->addClickHandler([=] {
*guard = LanguageBox::Show();
const auto m = button->clickModifiers();
if ((m & Qt::ShiftModifier) && (m & Qt::AltModifier)) {
Lang::CurrentCloudManager().switchToLanguage(qsl("custom"));
} else {
*guard = LanguageBox::Show();
}
});
}