GUI: Fix Repaint on stylesheet change

This commit is contained in:
Megamouse 2017-09-02 03:02:46 +02:00 committed by Ivan
commit 5cb6815bf3
3 changed files with 12 additions and 6 deletions

View file

@ -338,6 +338,7 @@ void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath)
file.close(); file.close();
} }
GUI::stylesheet = styleSheet(); GUI::stylesheet = styleSheet();
RPCS3MainWin->RepaintGui();
} }
/** /**

View file

@ -1040,6 +1040,14 @@ void main_window::AddRecentAction(const q_string_pair& entry)
guiSettings->SetValue(GUI::rg_entries, guiSettings->List2Var(m_rg_entries)); guiSettings->SetValue(GUI::rg_entries, guiSettings->List2Var(m_rg_entries));
} }
void main_window::RepaintGui()
{
gameListFrame->RepaintIcons(true);
gameListFrame->RepaintToolBarIcons();
RepaintToolbar();
RepaintToolBarIcons();
}
void main_window::RepaintToolbar() void main_window::RepaintToolbar()
{ {
if (guiSettings->GetValue(GUI::m_enableUIColors).toBool()) if (guiSettings->GetValue(GUI::m_enableUIColors).toBool())
@ -1138,12 +1146,7 @@ void main_window::CreateConnects()
connect(&dlg, &settings_dialog::GuiSettingsSaveRequest, this, &main_window::SaveWindowState); connect(&dlg, &settings_dialog::GuiSettingsSaveRequest, this, &main_window::SaveWindowState);
connect(&dlg, &settings_dialog::GuiSettingsSyncRequest, [=]() {ConfigureGuiFromSettings(true); }); connect(&dlg, &settings_dialog::GuiSettingsSyncRequest, [=]() {ConfigureGuiFromSettings(true); });
connect(&dlg, &settings_dialog::GuiStylesheetRequest, this, &main_window::RequestGlobalStylesheetChange); connect(&dlg, &settings_dialog::GuiStylesheetRequest, this, &main_window::RequestGlobalStylesheetChange);
connect(&dlg, &settings_dialog::GuiRepaintRequest, [this](){ connect(&dlg, &settings_dialog::GuiRepaintRequest, this, &main_window::RepaintGui);
gameListFrame->RepaintIcons(true);
gameListFrame->RepaintToolBarIcons();
RepaintToolbar();
RepaintToolBarIcons();
});
dlg.exec(); dlg.exec();
}; };
connect(ui->confCPUAct, &QAction::triggered, [=]() { openSettings(0); }); connect(ui->confCPUAct, &QAction::triggered, [=]() { openSettings(0); });

View file

@ -73,6 +73,8 @@ public Q_SLOTS:
void OnEmuPause(); void OnEmuPause();
void OnEmuReady(); void OnEmuReady();
void RepaintGui();
private Q_SLOTS: private Q_SLOTS:
void BootElf(); void BootElf();
void BootGame(); void BootGame();