mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-24 18:33:03 -07:00
[PublicDecks] Run retranslateUi at construction and name the refresh button
retranslateUi was never called from the constructor, so the tooltips set there were absent until a language change. Call it before the first refresh, and give the icon-only refresh button an accessible name for screen readers.
This commit is contained in:
parent
5e356ba4b0
commit
a70f729a57
1 changed files with 2 additions and 0 deletions
|
|
@ -106,6 +106,7 @@ TabPublicDecks::TabPublicDecks(TabSupervisor *_tabSupervisor, AbstractClient *_c
|
||||||
connect(quickSettingsWidget, &PublicDecksQuickSettingsWidget::showTagFilterChanged, this,
|
connect(quickSettingsWidget, &PublicDecksQuickSettingsWidget::showTagFilterChanged, this,
|
||||||
&TabPublicDecks::updateTagsVisibility);
|
&TabPublicDecks::updateTagsVisibility);
|
||||||
|
|
||||||
|
retranslateUi();
|
||||||
model->refresh(userName);
|
model->refresh(userName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,6 +121,7 @@ void TabPublicDecks::retranslateUi()
|
||||||
titleLabel->setText(tr("Public decks of %1").arg(userName.toHtmlEscaped()));
|
titleLabel->setText(tr("Public decks of %1").arg(userName.toHtmlEscaped()));
|
||||||
emptyLabel->setText(tr("This user has not published any decks."));
|
emptyLabel->setText(tr("This user has not published any decks."));
|
||||||
refreshButton->setToolTip(tr("Refresh"));
|
refreshButton->setToolTip(tr("Refresh"));
|
||||||
|
refreshButton->setAccessibleName(tr("Refresh"));
|
||||||
quickSettingsWidget->setToolTip(tr("Public Decks Settings"));
|
quickSettingsWidget->setToolTip(tr("Public Decks Settings"));
|
||||||
emit tabTextChanged(this, getTabText());
|
emit tabTextChanged(this, getTabText());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue