mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-09 08:47:48 +00:00

Remove window hints clearing the flag Qt::WindowContextHelpButtonHint, which is already off by default in Qt 6. In Qt 5 this flag was set by default for QDialogs, and on Windows put a ? button in the corner of the title bar allowing users to activate Qt's QWhatsThis help system for a given widget. Since we don't set that text the ? button was useless and so we hid it manually.
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
// Copyright 2020 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "DolphinQt/Config/FreeLookWindow.h"
|
|
|
|
#include <QDialogButtonBox>
|
|
#include <QLabel>
|
|
#include <QTabWidget>
|
|
#include <QVBoxLayout>
|
|
|
|
#include "DolphinQt/Config/FreeLookWidget.h"
|
|
#include "DolphinQt/Config/HardcoreWarningWidget.h"
|
|
|
|
FreeLookWindow::FreeLookWindow(QWidget* parent) : QDialog(parent)
|
|
{
|
|
CreateMainLayout();
|
|
ConnectWidgets();
|
|
|
|
setWindowTitle(tr("Free Look Settings"));
|
|
}
|
|
|
|
void FreeLookWindow::CreateMainLayout()
|
|
{
|
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
|
m_hc_warning = new HardcoreWarningWidget(this);
|
|
#endif // USE_RETRO_ACHIEVEMENTS
|
|
m_button_box = new QDialogButtonBox(QDialogButtonBox::Close);
|
|
connect(m_button_box, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
|
|
|
auto* main_layout = new QVBoxLayout();
|
|
|
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
|
main_layout->addWidget(m_hc_warning);
|
|
#endif // USE_RETRO_ACHIEVEMENTS
|
|
main_layout->addWidget(new FreeLookWidget(this));
|
|
main_layout->addWidget(m_button_box);
|
|
setLayout(main_layout);
|
|
}
|
|
|
|
void FreeLookWindow::ConnectWidgets()
|
|
{
|
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
|
connect(m_hc_warning, &HardcoreWarningWidget::OpenAchievementSettings, this,
|
|
&FreeLookWindow::OpenAchievementSettings);
|
|
#endif // USE_RETRO_ACHIEVEMENTS
|
|
}
|