MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / onThemeChanged

Method onThemeChanged

pcsx2-qt/MainWindow.cpp:2220–2238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2218}
2219
2220void MainWindow::onThemeChanged()
2221{
2222 [[maybe_unused]] const QString old_style_name = qApp->style()->name();
2223
2224 updateTheme();
2225
2226#ifdef _WIN32
2227 // Work around a bug where the background colour of menus is broken when changing to/from the windowsvista theme.
2228 const QString new_style_name = qApp->style()->name();
2229 if ((old_style_name == QStringLiteral("windowsvista")) != (new_style_name == QStringLiteral("windowsvista")))
2230 recreate();
2231#endif
2232
2233 // Reopen settings dialog after it applies. If you doSettings now, on macOS, the window will somehow end up
2234 // underneath the main window that was created above. Delay it slightly...
2235 QtHost::RunOnUIThread([] {
2236 g_main_window->doSettings("Interface");
2237 });
2238}
2239
2240void MainWindow::onLanguageChanged()
2241{

Callers

nothing calls this directly

Calls 2

doSettingsMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected