mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 00:28:56 +00:00
DolphinQt: Set window decorations for all top-level QWidgets.
This commit is contained in:
parent
0d0f821f96
commit
0a73df6b7b
43 changed files with 187 additions and 13 deletions
|
@ -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"
|
||||
|
@ -1331,6 +1332,7 @@ void MainWindow::ShowControllersWindow()
|
|||
InstallHotkeyFilter(m_controllers_window);
|
||||
}
|
||||
|
||||
SetQWidgetWindowDecorations(m_controllers_window);
|
||||
m_controllers_window->show();
|
||||
m_controllers_window->raise();
|
||||
m_controllers_window->activateWindow();
|
||||
|
@ -1344,6 +1346,7 @@ void MainWindow::ShowFreeLookWindow()
|
|||
InstallHotkeyFilter(m_freelook_window);
|
||||
}
|
||||
|
||||
SetQWidgetWindowDecorations(m_freelook_window);
|
||||
m_freelook_window->show();
|
||||
m_freelook_window->raise();
|
||||
m_freelook_window->activateWindow();
|
||||
|
@ -1357,6 +1360,7 @@ void MainWindow::ShowSettingsWindow()
|
|||
InstallHotkeyFilter(m_settings_window);
|
||||
}
|
||||
|
||||
SetQWidgetWindowDecorations(m_settings_window);
|
||||
m_settings_window->show();
|
||||
m_settings_window->raise();
|
||||
m_settings_window->activateWindow();
|
||||
|
@ -1377,6 +1381,7 @@ void MainWindow::ShowGeneralWindow()
|
|||
void MainWindow::ShowAboutDialog()
|
||||
{
|
||||
AboutDialog about{this};
|
||||
SetQWidgetWindowDecorations(&about);
|
||||
about.exec();
|
||||
}
|
||||
|
||||
|
@ -1388,6 +1393,7 @@ void MainWindow::ShowHotkeyDialog()
|
|||
InstallHotkeyFilter(m_hotkey_window);
|
||||
}
|
||||
|
||||
SetQWidgetWindowDecorations(m_hotkey_window);
|
||||
m_hotkey_window->show();
|
||||
m_hotkey_window->raise();
|
||||
m_hotkey_window->activateWindow();
|
||||
|
@ -1410,6 +1416,7 @@ void MainWindow::ShowGraphicsWindow()
|
|||
InstallHotkeyFilter(m_graphics_window);
|
||||
}
|
||||
|
||||
SetQWidgetWindowDecorations(m_graphics_window);
|
||||
m_graphics_window->show();
|
||||
m_graphics_window->raise();
|
||||
m_graphics_window->activateWindow();
|
||||
|
@ -1417,6 +1424,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();
|
||||
|
@ -1427,6 +1435,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();
|
||||
}
|
||||
|
||||
|
@ -1439,6 +1448,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();
|
||||
|
@ -1451,6 +1461,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();
|
||||
|
@ -1463,6 +1474,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();
|
||||
|
@ -1866,6 +1878,7 @@ void MainWindow::OnImportNANDBackup()
|
|||
dialog.Reset();
|
||||
});
|
||||
|
||||
SetQWidgetWindowDecorations(dialog.GetRaw());
|
||||
dialog.GetRaw()->exec();
|
||||
|
||||
result.wait();
|
||||
|
@ -1973,6 +1986,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();
|
||||
|
@ -1980,6 +1994,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();
|
||||
|
@ -1991,6 +2006,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();
|
||||
|
@ -2017,6 +2033,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();
|
||||
|
@ -2027,6 +2044,7 @@ void MainWindow::ShowMemcardManager()
|
|||
{
|
||||
GCMemcardManager manager(this);
|
||||
|
||||
SetQWidgetWindowDecorations(&manager);
|
||||
manager.exec();
|
||||
}
|
||||
|
||||
|
@ -2034,11 +2052,13 @@ void MainWindow::ShowResourcePackManager()
|
|||
{
|
||||
ResourcePackManager manager(this);
|
||||
|
||||
SetQWidgetWindowDecorations(&manager);
|
||||
manager.exec();
|
||||
}
|
||||
|
||||
void MainWindow::ShowCheatsManager()
|
||||
{
|
||||
SetQWidgetWindowDecorations(m_cheats_manager);
|
||||
m_cheats_manager->show();
|
||||
}
|
||||
|
||||
|
@ -2057,6 +2077,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;
|
||||
|
@ -2068,7 +2089,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue