diff --git a/src/duckstation-qt/gamelistwidget.cpp b/src/duckstation-qt/gamelistwidget.cpp index 0878ca0c4..5818724ca 100644 --- a/src/duckstation-qt/gamelistwidget.cpp +++ b/src/duckstation-qt/gamelistwidget.cpp @@ -1466,7 +1466,7 @@ void GameListWidget::cancelRefresh() AssertMsg(!m_refresh_thread, "Game list thread should be unreferenced by now"); } -void GameListWidget::reloadThemeSpecificImages() +void GameListWidget::onThemeChanged() { m_model->reloadThemeSpecificImages(); } diff --git a/src/duckstation-qt/gamelistwidget.h b/src/duckstation-qt/gamelistwidget.h index 15039c1ef..964133e59 100644 --- a/src/duckstation-qt/gamelistwidget.h +++ b/src/duckstation-qt/gamelistwidget.h @@ -238,7 +238,6 @@ public: void refresh(bool invalidate_cache); void cancelRefresh(); - void reloadThemeSpecificImages(); void setBackgroundPath(const std::string_view path); bool hasBackground() const; @@ -279,6 +278,8 @@ private: void onRefreshProgress(const QString& status, int current, int total, int entry_count, float time); void onRefreshComplete(); + void onThemeChanged(); + void showScaleToolTip(); void onScaleSliderChanged(int value); void onScaleChanged(); diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 696981bdf..ac1255985 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -2507,6 +2507,7 @@ void MainWindow::connectSignals() Qt::BlockingQueuedConnection); connect(g_emu_thread, &EmuThread::onDestroyAuxiliaryRenderWindow, this, &MainWindow::onDestroyAuxiliaryRenderWindow, Qt::BlockingQueuedConnection); + connect(this, &MainWindow::themeChanged, g_emu_thread, &EmuThread::updateFullscreenUITheme); // These need to be queued connections to stop crashing due to menus opening/closing and switching focus. connect(m_game_list_widget, &GameListWidget::refreshProgress, this, &MainWindow::onGameListRefreshProgress); @@ -2595,25 +2596,13 @@ void MainWindow::connectSignals() } } -void MainWindow::updateTheme() -{ - QtHost::UpdateApplicationTheme(); - g_emu_thread->updateFullscreenUITheme(); - reloadThemeSpecificImages(); -} - -void MainWindow::reloadThemeSpecificImages() -{ - m_game_list_widget->reloadThemeSpecificImages(); -} - void MainWindow::onSettingsThemeChanged() { #ifdef _WIN32 const QString old_style_name = qApp->style()->name(); #endif - updateTheme(); + QtHost::UpdateApplicationTheme(); #ifdef _WIN32 // Work around a bug where the background colour of menus is broken when changing to/from the windowsvista theme. @@ -2827,7 +2816,6 @@ void MainWindow::changeEvent(QEvent* event) if (event->type() == QEvent::StyleChange) { QtHost::SetIconThemeFromStyle(); - reloadThemeSpecificImages(); emit themeChanged(QtHost::IsDarkApplicationTheme()); } diff --git a/src/duckstation-qt/mainwindow.h b/src/duckstation-qt/mainwindow.h index 14a744928..d85a582ce 100644 --- a/src/duckstation-qt/mainwindow.h +++ b/src/duckstation-qt/mainwindow.h @@ -202,8 +202,6 @@ private: std::string getDeviceDiscPath(const QString& title); void setGameListEntryCoverImage(const GameList::Entry* entry); void clearGameListEntryPlayTime(const GameList::Entry* entry); - void updateTheme(); - void reloadThemeSpecificImages(); void onSettingsThemeChanged(); void destroySubWindows();