1
0
Fork 0

update-icons-signal

This commit is contained in:
BreadFish64 2018-03-30 10:20:21 -05:00
parent a7d035d9ee
commit 1d809ce6aa
2 changed files with 6 additions and 3 deletions

View File

@ -112,6 +112,9 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) {
ui.setupUi(this); ui.setupUi(this);
statusBar()->hide(); statusBar()->hide();
default_theme_paths = QIcon::themeSearchPaths();
UpdateUITheme();
InitializeWidgets(); InitializeWidgets();
InitializeDebugWidgets(); InitializeDebugWidgets();
InitializeRecentFileMenuActions(); InitializeRecentFileMenuActions();
@ -130,9 +133,6 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) {
game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan); game_list->PopulateAsync(UISettings::values.gamedir, UISettings::values.gamedir_deepscan);
default_theme_paths = QIcon::themeSearchPaths();
UpdateUITheme();
// Show one-time "callout" messages to the user // Show one-time "callout" messages to the user
ShowCallouts(); ShowCallouts();
@ -1249,6 +1249,7 @@ void GMainWindow::UpdateUITheme() {
QIcon::setThemeName(":/icons/default"); QIcon::setThemeName(":/icons/default");
} }
QIcon::setThemeSearchPaths(theme_paths); QIcon::setThemeSearchPaths(theme_paths);
emit UpdateThemedIcons();
} }
void GMainWindow::LoadTranslation() { void GMainWindow::LoadTranslation() {

View File

@ -74,6 +74,8 @@ signals:
void UpdateProgress(size_t written, size_t total); void UpdateProgress(size_t written, size_t total);
void CIAInstallReport(Service::AM::InstallStatus status, QString filepath); void CIAInstallReport(Service::AM::InstallStatus status, QString filepath);
void CIAInstallFinished(); void CIAInstallFinished();
// Signal that tells widgets to update icons to use the current theme
void UpdateThemedIcons();
private: private:
void InitializeWidgets(); void InitializeWidgets();