From 1d809ce6aa316f14450152203b8a9efbc09fbaa8 Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Fri, 30 Mar 2018 10:20:21 -0500 Subject: [PATCH] update-icons-signal --- src/citra_qt/main.cpp | 7 ++++--- src/citra_qt/main.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 9eac0f40df..e2ce67abff 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -112,6 +112,9 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { ui.setupUi(this); statusBar()->hide(); + default_theme_paths = QIcon::themeSearchPaths(); + UpdateUITheme(); + InitializeWidgets(); InitializeDebugWidgets(); InitializeRecentFileMenuActions(); @@ -130,9 +133,6 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); - default_theme_paths = QIcon::themeSearchPaths(); - UpdateUITheme(); - // Show one-time "callout" messages to the user ShowCallouts(); @@ -1249,6 +1249,7 @@ void GMainWindow::UpdateUITheme() { QIcon::setThemeName(":/icons/default"); } QIcon::setThemeSearchPaths(theme_paths); + emit UpdateThemedIcons(); } void GMainWindow::LoadTranslation() { diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 04fe742ea1..c29c0ccfca 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -74,6 +74,8 @@ signals: void UpdateProgress(size_t written, size_t total); void CIAInstallReport(Service::AM::InstallStatus status, QString filepath); void CIAInstallFinished(); + // Signal that tells widgets to update icons to use the current theme + void UpdateThemedIcons(); private: void InitializeWidgets();