diff options
author | Mai M <mathew1800@gmail.com> | 2022-06-11 19:19:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-11 19:19:18 +0200 |
commit | d796341d3395224efac3959d1b03c9f5c50f6ef9 (patch) | |
tree | 7e5f781f4e505c717560f5c867b1c5f8ccad5659 | |
parent | Merge pull request #8413 from behunin/bounded-queue (diff) | |
parent | UI: retranslate the game list placeholder (diff) | |
download | yuzu-d796341d3395224efac3959d1b03c9f5c50f6ef9.tar yuzu-d796341d3395224efac3959d1b03c9f5c50f6ef9.tar.gz yuzu-d796341d3395224efac3959d1b03c9f5c50f6ef9.tar.bz2 yuzu-d796341d3395224efac3959d1b03c9f5c50f6ef9.tar.lz yuzu-d796341d3395224efac3959d1b03c9f5c50f6ef9.tar.xz yuzu-d796341d3395224efac3959d1b03c9f5c50f6ef9.tar.zst yuzu-d796341d3395224efac3959d1b03c9f5c50f6ef9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/game_list.cpp | 14 | ||||
-rw-r--r-- | src/yuzu/game_list.h | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index d13530a5b..6321afc83 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -870,7 +870,7 @@ GameListPlaceholder::GameListPlaceholder(GMainWindow* parent) : QWidget{parent} layout->setAlignment(Qt::AlignCenter); 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(); font.setPointSize(20); text->setFont(font); @@ -891,3 +891,15 @@ void GameListPlaceholder::onUpdateThemedIcons() { void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) { 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")); +} diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h index d19dbe4b0..464da98ad 100644 --- a/src/yuzu/game_list.h +++ b/src/yuzu/game_list.h @@ -166,6 +166,9 @@ protected: void mouseDoubleClickEvent(QMouseEvent* event) override; private: + void changeEvent(QEvent* event) override; + void RetranslateUI(); + QVBoxLayout* layout = nullptr; QLabel* image = nullptr; QLabel* text = nullptr; |