diff options
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 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} | |||
| 870 | layout->setAlignment(Qt::AlignCenter); | 870 | layout->setAlignment(Qt::AlignCenter); |
| 871 | image->setPixmap(QIcon::fromTheme(QStringLiteral("plus_folder")).pixmap(200)); | 871 | image->setPixmap(QIcon::fromTheme(QStringLiteral("plus_folder")).pixmap(200)); |
| 872 | 872 | ||
| 873 | text->setText(tr("Double-click to add a new folder to the game list")); | 873 | RetranslateUI(); |
| 874 | QFont font = text->font(); | 874 | QFont font = text->font(); |
| 875 | font.setPointSize(20); | 875 | font.setPointSize(20); |
| 876 | text->setFont(font); | 876 | text->setFont(font); |
| @@ -891,3 +891,15 @@ void GameListPlaceholder::onUpdateThemedIcons() { | |||
| 891 | void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) { | 891 | void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) { |
| 892 | emit GameListPlaceholder::AddDirectory(); | 892 | emit GameListPlaceholder::AddDirectory(); |
| 893 | } | 893 | } |
| 894 | |||
| 895 | void GameListPlaceholder::changeEvent(QEvent* event) { | ||
| 896 | if (event->type() == QEvent::LanguageChange) { | ||
| 897 | RetranslateUI(); | ||
| 898 | } | ||
| 899 | |||
| 900 | QWidget::changeEvent(event); | ||
| 901 | } | ||
| 902 | |||
| 903 | void GameListPlaceholder::RetranslateUI() { | ||
| 904 | text->setText(tr("Double-click to add a new folder to the game list")); | ||
| 905 | } | ||
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: | |||
| 166 | void mouseDoubleClickEvent(QMouseEvent* event) override; | 166 | void mouseDoubleClickEvent(QMouseEvent* event) override; |
| 167 | 167 | ||
| 168 | private: | 168 | private: |
| 169 | void changeEvent(QEvent* event) override; | ||
| 170 | void RetranslateUI(); | ||
| 171 | |||
| 169 | QVBoxLayout* layout = nullptr; | 172 | QVBoxLayout* layout = nullptr; |
| 170 | QLabel* image = nullptr; | 173 | QLabel* image = nullptr; |
| 171 | QLabel* text = nullptr; | 174 | QLabel* text = nullptr; |