diff options
author | Kyle Kienapfel <Docteh@users.noreply.github.com> | 2022-06-11 04:17:18 +0200 |
---|---|---|
committer | Kyle Kienapfel <Docteh@users.noreply.github.com> | 2022-06-11 05:15:52 +0200 |
commit | 2ff606628cf1393d85fb51060a296bceb4d29bfd (patch) | |
tree | a142f40c3d81a01478d02106af7eb9e147f7d363 | |
parent | Merge pull request #8385 from lat9nq/just-subsys-win (diff) | |
download | yuzu-2ff606628cf1393d85fb51060a296bceb4d29bfd.tar yuzu-2ff606628cf1393d85fb51060a296bceb4d29bfd.tar.gz yuzu-2ff606628cf1393d85fb51060a296bceb4d29bfd.tar.bz2 yuzu-2ff606628cf1393d85fb51060a296bceb4d29bfd.tar.lz yuzu-2ff606628cf1393d85fb51060a296bceb4d29bfd.tar.xz yuzu-2ff606628cf1393d85fb51060a296bceb4d29bfd.tar.zst yuzu-2ff606628cf1393d85fb51060a296bceb4d29bfd.zip |
-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 4a6d74a7e..851035aa1 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; |