mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Merge pull request #13665 from jordan-woyak/dark-mode-filter
DolphinQt: Replace widespread SetQWidgetWindowDecorations calls with an event filter.
This commit is contained in:
@ -11,7 +11,6 @@
|
||||
|
||||
#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)
|
||||
@ -34,7 +33,6 @@ 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);
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "DolphinQt/Config/Mapping/MappingWindow.h"
|
||||
#include "DolphinQt/QtUtils/BlockUserInputFilter.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
#include "InputCommon/ControlReference/ControlReference.h"
|
||||
@ -259,8 +258,6 @@ IOWindow::IOWindow(MappingWindow* window, ControllerEmu::EmulatedController* con
|
||||
: QDialog(window), m_reference(ref), m_original_expression(ref->GetExpression()),
|
||||
m_controller(controller), m_type(type)
|
||||
{
|
||||
SetQWidgetWindowDecorations(this);
|
||||
|
||||
CreateMainLayout();
|
||||
|
||||
connect(window, &MappingWindow::Update, this, &IOWindow::Update);
|
||||
|
@ -18,7 +18,6 @@
|
||||
#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/ControllerEmu/Control/Control.h"
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
|
||||
@ -282,7 +281,6 @@ void MappingWidget::ShowAdvancedControlGroupDialog(ControllerEmu::ControlGroup*
|
||||
// Enable "Close" button functionality.
|
||||
connect(button_box, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
||||
|
||||
SetQWidgetWindowDecorations(&dialog);
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,6 @@
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
#include "DolphinQt/QtUtils/QtUtils.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
#include "DolphinQt/QtUtils/WindowActivationEventFilter.h"
|
||||
#include "DolphinQt/QtUtils/WrapInScrollArea.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
@ -271,7 +270,6 @@ 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;
|
||||
}
|
||||
@ -284,7 +282,6 @@ void MappingWindow::OnDeleteProfilePressed()
|
||||
confirm.setInformativeText(tr("This cannot be undone!"));
|
||||
confirm.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
|
||||
|
||||
SetQWidgetWindowDecorations(&confirm);
|
||||
if (confirm.exec() != QMessageBox::Yes)
|
||||
{
|
||||
return;
|
||||
@ -312,7 +309,6 @@ 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;
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
|
||||
#include "DolphinQt/QtUtils/QtUtils.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "InputCommon/InputConfig.h"
|
||||
|
||||
@ -43,7 +42,6 @@ void WiimoteEmuExtensionMotionInput::CreateNunchukLayout()
|
||||
warning_layout->addWidget(warning_input_sources_button);
|
||||
connect(warning_input_sources_button, &QPushButton::clicked, this, [this] {
|
||||
ControllerInterfaceWindow window{this};
|
||||
SetQWidgetWindowDecorations(&window);
|
||||
window.exec();
|
||||
});
|
||||
layout->addLayout(warning_layout, 0, 0, 1, -1);
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
|
||||
#include "DolphinQt/QtUtils/QtUtils.h"
|
||||
#include "DolphinQt/QtUtils/SetWindowDecorations.h"
|
||||
|
||||
#include "InputCommon/InputConfig.h"
|
||||
|
||||
@ -41,7 +40,6 @@ void WiimoteEmuMotionControlIMU::CreateMainLayout()
|
||||
warning_layout->addWidget(warning_input_sources_button);
|
||||
connect(warning_input_sources_button, &QPushButton::clicked, this, [this] {
|
||||
ControllerInterfaceWindow window{this};
|
||||
SetQWidgetWindowDecorations(&window);
|
||||
window.exec();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user