| 2218 | } |
| 2219 | |
| 2220 | void 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 | |
| 2240 | void MainWindow::onLanguageChanged() |
| 2241 | { |
nothing calls this directly
no test coverage detected