2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Realtime UI translation in all fields and buttons.

This commit is contained in:
John Preston
2017-05-30 18:21:05 +03:00
parent 5fc4f4ed36
commit b94099e25b
80 changed files with 644 additions and 535 deletions

View File

@@ -382,12 +382,13 @@ void Inner::refreshSwitchPmButton(const CacheEntry *entry) {
_switchPmStartToken.clear();
} else {
if (!_switchPmButton) {
_switchPmButton.create(this, QString(), st::switchPmButton);
_switchPmButton.create(this, base::lambda<QString()>(), st::switchPmButton);
_switchPmButton->show();
_switchPmButton->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
connect(_switchPmButton, SIGNAL(clicked()), this, SLOT(onSwitchPm()));
}
_switchPmButton->setText(entry->switchPmText); // doesn't perform text.toUpper()
auto text = entry->switchPmText;
_switchPmButton->setText([text] { return text; }); // doesn't perform text.toUpper()
_switchPmStartToken = entry->switchPmStartToken;
auto buttonTop = st::stickerPanPadding;
_switchPmButton->move(st::inlineResultsLeft - st::buttonRadius, buttonTop);