diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-07-31 00:42:15 +0200 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-08-12 16:54:54 +0200 |
| commit | e2fb8fab2f695ee53ab0aa7a5ff2fe752c719ce8 (patch) | |
| tree | 7bf7daaedddc11b41e704c51792954845ebad924 /Source/Core/DolphinQt/MainWindow.cpp | |
| parent | e8d23af0f2799337af0b0c69a34aa717bf88766e (diff) | |
DolphinQt: Set window decorations for all top-level QWidgets.
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 42a6a04603..b193fe15c7 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -108,6 +108,7 @@ #include "DolphinQt/QtUtils/ParallelProgressDialog.h" #include "DolphinQt/QtUtils/QueueOnObject.h" #include "DolphinQt/QtUtils/RunOnObject.h" +#include "DolphinQt/QtUtils/SetWindowDecorations.h" #include "DolphinQt/QtUtils/WindowActivationEventFilter.h" #include "DolphinQt/RenderWidget.h" #include "DolphinQt/ResourcePackManager.h" @@ -1225,6 +1226,7 @@ void MainWindow::ShowControllersWindow() InstallHotkeyFilter(m_controllers_window); } + SetQWidgetWindowDecorations(m_controllers_window); m_controllers_window->show(); m_controllers_window->raise(); m_controllers_window->activateWindow(); @@ -1238,6 +1240,7 @@ void MainWindow::ShowFreeLookWindow() InstallHotkeyFilter(m_freelook_window); } + SetQWidgetWindowDecorations(m_freelook_window); m_freelook_window->show(); m_freelook_window->raise(); m_freelook_window->activateWindow(); @@ -1251,6 +1254,7 @@ void MainWindow::ShowSettingsWindow() InstallHotkeyFilter(m_settings_window); } + SetQWidgetWindowDecorations(m_settings_window); m_settings_window->show(); m_settings_window->raise(); m_settings_window->activateWindow(); @@ -1271,6 +1275,7 @@ void MainWindow::ShowGeneralWindow() void MainWindow::ShowAboutDialog() { AboutDialog about{this}; + SetQWidgetWindowDecorations(&about); about.exec(); } @@ -1282,6 +1287,7 @@ void MainWindow::ShowHotkeyDialog() InstallHotkeyFilter(m_hotkey_window); } + SetQWidgetWindowDecorations(m_hotkey_window); m_hotkey_window->show(); m_hotkey_window->raise(); m_hotkey_window->activateWindow(); @@ -1304,6 +1310,7 @@ void MainWindow::ShowGraphicsWindow() InstallHotkeyFilter(m_graphics_window); } + SetQWidgetWindowDecorations(m_graphics_window); m_graphics_window->show(); m_graphics_window->raise(); m_graphics_window->activateWindow(); @@ -1311,6 +1318,7 @@ void MainWindow::ShowGraphicsWindow() void MainWindow::ShowNetPlaySetupDialog() { + SetQWidgetWindowDecorations(m_netplay_setup_dialog); m_netplay_setup_dialog->show(); m_netplay_setup_dialog->raise(); m_netplay_setup_dialog->activateWindow(); @@ -1321,6 +1329,7 @@ void MainWindow::ShowNetPlayBrowser() auto* browser = new NetPlayBrowser(this); browser->setAttribute(Qt::WA_DeleteOnClose, true); connect(browser, &NetPlayBrowser::Join, this, &MainWindow::NetPlayJoin); + SetQWidgetWindowDecorations(browser); browser->exec(); } @@ -1333,6 +1342,7 @@ void MainWindow::ShowFIFOPlayer() [this](const QString& path) { StartGame(path, ScanForSecondDisc::No); }); } + SetQWidgetWindowDecorations(m_fifo_window); m_fifo_window->show(); m_fifo_window->raise(); m_fifo_window->activateWindow(); @@ -1345,6 +1355,7 @@ void MainWindow::ShowSkylanderPortal() m_skylander_window = new SkylanderPortalWindow(); } + SetQWidgetWindowDecorations(m_skylander_window); m_skylander_window->show(); m_skylander_window->raise(); m_skylander_window->activateWindow(); @@ -1357,6 +1368,7 @@ void MainWindow::ShowInfinityBase() m_infinity_window = new InfinityBaseWindow(); } + SetQWidgetWindowDecorations(m_infinity_window); m_infinity_window->show(); m_infinity_window->raise(); m_infinity_window->activateWindow(); @@ -1759,6 +1771,7 @@ void MainWindow::OnImportNANDBackup() dialog.Reset(); }); + SetQWidgetWindowDecorations(dialog.GetRaw()); dialog.GetRaw()->exec(); result.wait(); @@ -1866,6 +1879,7 @@ void MainWindow::ShowTASInput() const auto si_device = Config::Get(Config::GetInfoForSIDevice(i)); if (si_device == SerialInterface::SIDEVICE_GC_GBA_EMULATED) { + SetQWidgetWindowDecorations(m_gba_tas_input_windows[i]); m_gba_tas_input_windows[i]->show(); m_gba_tas_input_windows[i]->raise(); m_gba_tas_input_windows[i]->activateWindow(); @@ -1873,6 +1887,7 @@ void MainWindow::ShowTASInput() else if (si_device != SerialInterface::SIDEVICE_NONE && si_device != SerialInterface::SIDEVICE_GC_GBA) { + SetQWidgetWindowDecorations(m_gc_tas_input_windows[i]); m_gc_tas_input_windows[i]->show(); m_gc_tas_input_windows[i]->raise(); m_gc_tas_input_windows[i]->activateWindow(); @@ -1884,6 +1899,7 @@ void MainWindow::ShowTASInput() if (Config::Get(Config::GetInfoForWiimoteSource(i)) == WiimoteSource::Emulated && (!Core::IsRunning() || SConfig::GetInstance().bWii)) { + SetQWidgetWindowDecorations(m_wii_tas_input_windows[i]); m_wii_tas_input_windows[i]->show(); m_wii_tas_input_windows[i]->raise(); m_wii_tas_input_windows[i]->activateWindow(); @@ -1910,6 +1926,7 @@ void MainWindow::ShowAchievementsWindow() m_achievements_window = new AchievementsWindow(this); } + SetQWidgetWindowDecorations(m_achievements_window); m_achievements_window->show(); m_achievements_window->raise(); m_achievements_window->activateWindow(); @@ -1920,6 +1937,7 @@ void MainWindow::ShowMemcardManager() { GCMemcardManager manager(this); + SetQWidgetWindowDecorations(&manager); manager.exec(); } @@ -1927,11 +1945,13 @@ void MainWindow::ShowResourcePackManager() { ResourcePackManager manager(this); + SetQWidgetWindowDecorations(&manager); manager.exec(); } void MainWindow::ShowCheatsManager() { + SetQWidgetWindowDecorations(m_cheats_manager); m_cheats_manager->show(); } @@ -1950,6 +1970,7 @@ void MainWindow::ShowRiivolutionBootWidget(const UICommon::GameFile& game) auto& disc = std::get<BootParameters::Disc>(boot_params->parameters); RiivolutionBootWidget w(disc.volume->GetGameID(), disc.volume->GetRevision(), disc.volume->GetDiscNumber(), game.GetFilePath(), this); + SetQWidgetWindowDecorations(&w); w.exec(); if (!w.ShouldBoot()) return; @@ -1961,7 +1982,10 @@ void MainWindow::ShowRiivolutionBootWidget(const UICommon::GameFile& game) void MainWindow::Show() { if (!Settings::Instance().IsBatchModeEnabled()) + { + SetQWidgetWindowDecorations(this); QWidget::show(); + } // If the booting of a game was requested on start up, do that now if (m_pending_boot != nullptr) |
