mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 03:54:20 +01:00
Merge pull request #8449 from Docteh/translate_placeholder
retranslate the game list placeholder
This commit is contained in:
commit
d796341d33
@ -870,7 +870,7 @@ GameListPlaceholder::GameListPlaceholder(GMainWindow* parent) : QWidget{parent}
|
|||||||
layout->setAlignment(Qt::AlignCenter);
|
layout->setAlignment(Qt::AlignCenter);
|
||||||
image->setPixmap(QIcon::fromTheme(QStringLiteral("plus_folder")).pixmap(200));
|
image->setPixmap(QIcon::fromTheme(QStringLiteral("plus_folder")).pixmap(200));
|
||||||
|
|
||||||
text->setText(tr("Double-click to add a new folder to the game list"));
|
RetranslateUI();
|
||||||
QFont font = text->font();
|
QFont font = text->font();
|
||||||
font.setPointSize(20);
|
font.setPointSize(20);
|
||||||
text->setFont(font);
|
text->setFont(font);
|
||||||
@ -891,3 +891,15 @@ void GameListPlaceholder::onUpdateThemedIcons() {
|
|||||||
void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) {
|
void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) {
|
||||||
emit GameListPlaceholder::AddDirectory();
|
emit GameListPlaceholder::AddDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameListPlaceholder::changeEvent(QEvent* event) {
|
||||||
|
if (event->type() == QEvent::LanguageChange) {
|
||||||
|
RetranslateUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget::changeEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameListPlaceholder::RetranslateUI() {
|
||||||
|
text->setText(tr("Double-click to add a new folder to the game list"));
|
||||||
|
}
|
||||||
|
@ -166,6 +166,9 @@ protected:
|
|||||||
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void changeEvent(QEvent* event) override;
|
||||||
|
void RetranslateUI();
|
||||||
|
|
||||||
QVBoxLayout* layout = nullptr;
|
QVBoxLayout* layout = nullptr;
|
||||||
QLabel* image = nullptr;
|
QLabel* image = nullptr;
|
||||||
QLabel* text = nullptr;
|
QLabel* text = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user