mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
DolphinQt: Set window decorations for all top-level QWidgets.
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include "DolphinQt/Config/CheatCodeEditor.h"
|
||||
#include "DolphinQt/Config/CheatWarningWidget.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "UICommon/GameFile.h"
|
||||
|
||||
@ -230,6 +231,7 @@ void ARCodeWidget::OnCodeAddClicked()
|
||||
|
||||
CheatCodeEditor ed(this);
|
||||
ed.SetARCode(&ar);
|
||||
SetQWidgetWindowDecorations(&ed);
|
||||
if (ed.exec() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
@ -253,6 +255,7 @@ void ARCodeWidget::OnCodeEditClicked()
|
||||
{
|
||||
ed.SetARCode(¤t_ar);
|
||||
|
||||
SetQWidgetWindowDecorations(&ed);
|
||||
if (ed.exec() == QDialog::Rejected)
|
||||
return;
|
||||
}
|
||||
@ -261,6 +264,7 @@ void ARCodeWidget::OnCodeEditClicked()
|
||||
ActionReplay::ARCode ar = current_ar;
|
||||
ed.SetARCode(&ar);
|
||||
|
||||
SetQWidgetWindowDecorations(&ed);
|
||||
if (ed.exec() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/QtUtils/SignalBlocking.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
@ -59,6 +60,7 @@ void CommonControllersWidget::OnControllerInterfaceConfigure()
|
||||
ControllerInterfaceWindow* window = new ControllerInterfaceWindow(this);
|
||||
window->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
window->setWindowModality(Qt::WindowModality::WindowModal);
|
||||
SetQWidgetWindowDecorations(window);
|
||||
window->show();
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "Common/Config/Config.h"
|
||||
#include "DolphinQt/Config/ControllerInterface/DualShockUDPClientAddServerDialog.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "InputCommon/ControllerInterface/DualShockUDPClient/DualShockUDPClient.h"
|
||||
|
||||
DualShockUDPClientWidget::DualShockUDPClientWidget()
|
||||
@ -111,6 +112,7 @@ void DualShockUDPClientWidget::OnServerAdded()
|
||||
DualShockUDPClientAddServerDialog add_server_dialog(this);
|
||||
connect(&add_server_dialog, &DualShockUDPClientAddServerDialog::accepted, this,
|
||||
&DualShockUDPClientWidget::RefreshServerList);
|
||||
SetQWidgetWindowDecorations(&add_server_dialog);
|
||||
add_server_dialog.exec();
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "DolphinQt/QtUtils/DolphinFileDialog.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/Resources.h"
|
||||
|
||||
#include "UICommon/UICommon.h"
|
||||
@ -364,6 +365,7 @@ void FilesystemWidget::ExtractDirectory(const DiscIO::Partition& partition, cons
|
||||
dialog.Reset();
|
||||
});
|
||||
|
||||
SetQWidgetWindowDecorations(dialog.GetRaw());
|
||||
dialog.GetRaw()->exec();
|
||||
future.get();
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "DolphinQt/Config/Mapping/MappingWindow.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
FreeLookWidget::FreeLookWidget(QWidget* parent) : QWidget(parent)
|
||||
@ -97,6 +98,7 @@ void FreeLookWidget::OnFreeLookControllerConfigured()
|
||||
MappingWindow* window = new MappingWindow(this, MappingWindow::Type::MAPPING_FREELOOK, index);
|
||||
window->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
window->setWindowModality(Qt::WindowModality::WindowModal);
|
||||
SetQWidgetWindowDecorations(window);
|
||||
window->show();
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "DolphinQt/Config/Mapping/GCPadWiiUConfigDialog.h"
|
||||
#include "DolphinQt/Config/Mapping/MappingWindow.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/QtUtils/SignalBlocking.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
@ -137,8 +138,12 @@ void GamecubeControllersWidget::OnGCPadConfigure(size_t index)
|
||||
type = MappingWindow::Type::MAPPING_GCPAD;
|
||||
break;
|
||||
case SerialInterface::SIDEVICE_WIIU_ADAPTER:
|
||||
GCPadWiiUConfigDialog(static_cast<int>(index), this).exec();
|
||||
{
|
||||
GCPadWiiUConfigDialog dialog(static_cast<int>(index), this);
|
||||
SetQWidgetWindowDecorations(&dialog);
|
||||
dialog.exec();
|
||||
return;
|
||||
}
|
||||
case SerialInterface::SIDEVICE_GC_STEERING:
|
||||
type = MappingWindow::Type::MAPPING_GC_STEERINGWHEEL;
|
||||
break;
|
||||
@ -161,6 +166,7 @@ void GamecubeControllersWidget::OnGCPadConfigure(size_t index)
|
||||
MappingWindow* window = new MappingWindow(this, type, static_cast<int>(index));
|
||||
window->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
window->setWindowModality(Qt::WindowModality::WindowModal);
|
||||
SetQWidgetWindowDecorations(window);
|
||||
window->show();
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "DolphinQt/Config/CheatWarningWidget.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "UICommon/GameFile.h"
|
||||
|
||||
@ -201,6 +202,7 @@ void GeckoCodeWidget::AddCode()
|
||||
|
||||
CheatCodeEditor ed(this);
|
||||
ed.SetGeckoCode(&code);
|
||||
SetQWidgetWindowDecorations(&ed);
|
||||
if (ed.exec() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
@ -219,6 +221,7 @@ void GeckoCodeWidget::EditCode()
|
||||
|
||||
CheatCodeEditor ed(this);
|
||||
ed.SetGeckoCode(&m_gecko_codes[index]);
|
||||
SetQWidgetWindowDecorations(&ed);
|
||||
if (ed.exec() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
|
||||
#include "DolphinQt/Config/Graphics/PostProcessingConfigWindow.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
#include "VideoCommon/PostProcessing.h"
|
||||
@ -570,11 +571,15 @@ void EnhancementsWidget::AddDescriptions()
|
||||
|
||||
void EnhancementsWidget::ConfigureColorCorrection()
|
||||
{
|
||||
ColorCorrectionConfigWindow(this).exec();
|
||||
ColorCorrectionConfigWindow dialog(this);
|
||||
SetQWidgetWindowDecorations(&dialog);
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
void EnhancementsWidget::ConfigurePostProcessingShader()
|
||||
{
|
||||
const std::string shader = Config::Get(Config::GFX_ENHANCE_POST_SHADER);
|
||||
PostProcessingConfigWindow(this, shader).exec();
|
||||
PostProcessingConfigWindow dialog(this, shader);
|
||||
SetQWidgetWindowDecorations(&dialog);
|
||||
dialog.exec();
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
@ -164,6 +165,7 @@ void GeneralWidget::SaveSettings()
|
||||
confirm_sw.setWindowTitle(tr("Confirm backend change"));
|
||||
confirm_sw.setText(tr(warningMessage->c_str()));
|
||||
|
||||
SetQWidgetWindowDecorations(&confirm_sw);
|
||||
if (confirm_sw.exec() != QMessageBox::Yes)
|
||||
{
|
||||
m_backend_combo->setCurrentIndex(m_backend_combo->findData(
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "Core/FreeLookManager.h"
|
||||
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "InputCommon/InputConfig.h"
|
||||
|
||||
FreeLookRotation::FreeLookRotation(MappingWindow* window) : MappingWidget(window)
|
||||
@ -33,6 +34,7 @@ void FreeLookRotation::CreateMainLayout()
|
||||
ControllerInterfaceWindow* window = new ControllerInterfaceWindow(this);
|
||||
window->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
window->setWindowModality(Qt::WindowModality::WindowModal);
|
||||
SetQWidgetWindowDecorations(window);
|
||||
window->show();
|
||||
});
|
||||
m_main_layout->addLayout(alternate_input_layout, 0, 0, 1, -1);
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "DolphinQt/Config/Mapping/MappingCommon.h"
|
||||
#include "DolphinQt/Config/Mapping/MappingWidget.h"
|
||||
#include "DolphinQt/Config/Mapping/MappingWindow.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "InputCommon/ControlReference/ControlReference.h"
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/Buttons.h"
|
||||
@ -97,6 +98,7 @@ void MappingButton::AdvancedPressed()
|
||||
{
|
||||
IOWindow io(m_parent, m_parent->GetController(), m_reference,
|
||||
m_reference->IsInput() ? IOWindow::Type::Input : IOWindow::Type::Output);
|
||||
SetQWidgetWindowDecorations(&io);
|
||||
io.exec();
|
||||
|
||||
ConfigChanged();
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "DolphinQt/Config/Mapping/MappingIndicator.h"
|
||||
#include "DolphinQt/Config/Mapping/MappingNumeric.h"
|
||||
#include "DolphinQt/Config/Mapping/MappingWindow.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "InputCommon/ControlReference/ControlReference.h"
|
||||
#include "InputCommon/ControllerEmu/Control/Control.h"
|
||||
@ -248,6 +249,7 @@ void MappingWidget::ShowAdvancedControlGroupDialog(ControllerEmu::ControlGroup*
|
||||
// Enable "Close" button functionality.
|
||||
connect(button_box, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
||||
|
||||
SetQWidgetWindowDecorations(&dialog);
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
@ -303,6 +305,7 @@ MappingWidget::CreateSettingAdvancedMappingButton(ControllerEmu::NumericSettingB
|
||||
setting.SetExpressionFromValue();
|
||||
|
||||
IOWindow io(this, GetController(), &setting.GetInputReference(), IOWindow::Type::Input);
|
||||
SetQWidgetWindowDecorations(&io);
|
||||
io.exec();
|
||||
|
||||
setting.SimplifyIfPossible();
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include "DolphinQt/Config/Mapping/WiimoteEmuMotionControlIMU.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/QtUtils/WindowActivationEventFilter.h"
|
||||
#include "DolphinQt/QtUtils/WrapInScrollArea.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
@ -255,6 +256,7 @@ void MappingWindow::OnDeleteProfilePressed()
|
||||
error.setIcon(QMessageBox::Critical);
|
||||
error.setWindowTitle(tr("Error"));
|
||||
error.setText(tr("The profile '%1' does not exist").arg(profile_name));
|
||||
SetQWidgetWindowDecorations(&error);
|
||||
error.exec();
|
||||
return;
|
||||
}
|
||||
@ -267,6 +269,7 @@ void MappingWindow::OnDeleteProfilePressed()
|
||||
confirm.setInformativeText(tr("This cannot be undone!"));
|
||||
confirm.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
|
||||
|
||||
SetQWidgetWindowDecorations(&confirm);
|
||||
if (confirm.exec() != QMessageBox::Yes)
|
||||
{
|
||||
return;
|
||||
@ -294,6 +297,7 @@ void MappingWindow::OnLoadProfilePressed()
|
||||
error.setIcon(QMessageBox::Critical);
|
||||
error.setWindowTitle(tr("Error"));
|
||||
error.setText(tr("The profile '%1' does not exist").arg(m_profiles_combo->currentText()));
|
||||
SetQWidgetWindowDecorations(&error);
|
||||
error.exec();
|
||||
return;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
||||
|
||||
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "InputCommon/InputConfig.h"
|
||||
|
||||
@ -42,6 +43,7 @@ void WiimoteEmuExtensionMotionInput::CreateNunchukLayout()
|
||||
ControllerInterfaceWindow* window = new ControllerInterfaceWindow(this);
|
||||
window->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
window->setWindowModality(Qt::WindowModality::WindowModal);
|
||||
SetQWidgetWindowDecorations(window);
|
||||
window->show();
|
||||
});
|
||||
layout->addLayout(warning_layout, 0, 0, 1, -1);
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
||||
|
||||
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "InputCommon/InputConfig.h"
|
||||
|
||||
@ -40,6 +41,7 @@ void WiimoteEmuMotionControlIMU::CreateMainLayout()
|
||||
ControllerInterfaceWindow* window = new ControllerInterfaceWindow(this);
|
||||
window->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
window->setWindowModality(Qt::WindowModality::WindowModal);
|
||||
SetQWidgetWindowDecorations(window);
|
||||
window->show();
|
||||
});
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "Core/PatchEngine.h"
|
||||
|
||||
#include "DolphinQt/Config/NewPatchDialog.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "UICommon/GameFile.h"
|
||||
|
||||
@ -74,7 +75,13 @@ void PatchesWidget::OnAdd()
|
||||
PatchEngine::Patch patch;
|
||||
patch.user_defined = true;
|
||||
|
||||
if (NewPatchDialog(this, patch).exec())
|
||||
bool new_patch_confirmed = false;
|
||||
{
|
||||
NewPatchDialog dialog(this, patch);
|
||||
SetQWidgetWindowDecorations(&dialog);
|
||||
new_patch_confirmed = dialog.exec();
|
||||
}
|
||||
if (new_patch_confirmed)
|
||||
{
|
||||
m_patches.push_back(patch);
|
||||
SavePatches();
|
||||
@ -98,7 +105,13 @@ void PatchesWidget::OnEdit()
|
||||
patch.name = tr("%1 (Copy)").arg(QString::fromStdString(patch.name)).toStdString();
|
||||
}
|
||||
|
||||
if (NewPatchDialog(this, patch).exec())
|
||||
bool new_patch_confirmed = false;
|
||||
{
|
||||
NewPatchDialog dialog(this, patch);
|
||||
SetQWidgetWindowDecorations(&dialog);
|
||||
new_patch_confirmed = dialog.exec();
|
||||
}
|
||||
if (new_patch_confirmed)
|
||||
{
|
||||
if (patch.user_defined)
|
||||
{
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/VolumeVerifier.h"
|
||||
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
VerifyWidget::VerifyWidget(std::shared_ptr<DiscIO::Volume> volume) : m_volume(std::move(volume))
|
||||
@ -180,6 +181,7 @@ void VerifyWidget::Verify()
|
||||
|
||||
return result;
|
||||
});
|
||||
SetQWidgetWindowDecorations(progress.GetRaw());
|
||||
progress.GetRaw()->exec();
|
||||
|
||||
std::optional<DiscIO::VolumeVerifier::Result> result = future.get();
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "DolphinQt/Config/Mapping/MappingWindow.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/QtUtils/SignalBlocking.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
@ -261,6 +262,7 @@ void WiimoteControllersWidget::OnWiimoteConfigure(size_t index)
|
||||
MappingWindow* window = new MappingWindow(this, type, static_cast<int>(index));
|
||||
window->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
window->setWindowModality(Qt::WindowModality::WindowModal);
|
||||
SetQWidgetWindowDecorations(window);
|
||||
window->show();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user