[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:
Lukas Brübach 2026-09-19 07:48:44 +02:00 committed by GitHub
parent 5e356ba4b0
commit a70f729a57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -106,6 +106,7 @@ TabPublicDecks::TabPublicDecks(TabSupervisor *_tabSupervisor, AbstractClient *_c
connect(quickSettingsWidget, &PublicDecksQuickSettingsWidget::showTagFilterChanged, this,
&TabPublicDecks::updateTagsVisibility);
retranslateUi();
model->refresh(userName);
}
@ -120,6 +121,7 @@ void TabPublicDecks::retranslateUi()
titleLabel->setText(tr("Public decks of %1").arg(userName.toHtmlEscaped()));
emptyLabel->setText(tr("This user has not published any decks."));
refreshButton->setToolTip(tr("Refresh"));
refreshButton->setAccessibleName(tr("Refresh"));
quickSettingsWidget->setToolTip(tr("Public Decks Settings"));
emit tabTextChanged(this, getTabText());
}