mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 00:40:58 +01:00
main: Globally disable the "?" button on dialogs
Sets the AA_DisableWindowContextHelpButton attribute to disable this useless button globally.
This commit is contained in:
parent
44b981fd3e
commit
cdfb3795af
10 changed files with 8 additions and 17 deletions
|
@ -66,7 +66,6 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
||||||
|
|
||||||
web_tab->SetWebServiceConfigEnabled(enable_web_config);
|
web_tab->SetWebServiceConfigEnabled(enable_web_config);
|
||||||
hotkeys_tab->Populate(registry);
|
hotkeys_tab->Populate(registry);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
|
|
||||||
input_tab->Initialize(input_subsystem);
|
input_tab->Initialize(input_subsystem);
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,6 @@ ConfigureMotionTouch::ConfigureMotionTouch(QWidget* parent,
|
||||||
"using-a-controller-or-android-phone-for-motion-or-touch-input'><span "
|
"using-a-controller-or-android-phone-for-motion-or-touch-input'><span "
|
||||||
"style=\"text-decoration: underline; color:#039be5;\">Learn More</span></a>"));
|
"style=\"text-decoration: underline; color:#039be5;\">Learn More</span></a>"));
|
||||||
|
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
SetConfiguration();
|
SetConfiguration();
|
||||||
UpdateUiDisplay();
|
UpdateUiDisplay();
|
||||||
ConnectEvents();
|
ConnectEvents();
|
||||||
|
|
|
@ -66,8 +66,6 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
|
||||||
|
|
||||||
setFocusPolicy(Qt::ClickFocus);
|
setFocusPolicy(Qt::ClickFocus);
|
||||||
setWindowTitle(tr("Properties"));
|
setWindowTitle(tr("Properties"));
|
||||||
// remove Help question mark button from the title bar
|
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
|
|
||||||
addons_tab->SetTitleId(title_id);
|
addons_tab->SetTitleId(title_id);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ ConfigureTasDialog::ConfigureTasDialog(QWidget* parent)
|
||||||
|
|
||||||
setFocusPolicy(Qt::ClickFocus);
|
setFocusPolicy(Qt::ClickFocus);
|
||||||
setWindowTitle(tr("TAS Configuration"));
|
setWindowTitle(tr("TAS Configuration"));
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
|
|
||||||
connect(ui->tas_path_button, &QToolButton::pressed, this,
|
connect(ui->tas_path_button, &QToolButton::pressed, this,
|
||||||
[this] { SetDirectory(DirectoryTarget::TAS, ui->tas_path_edit); });
|
[this] { SetDirectory(DirectoryTarget::TAS, ui->tas_path_edit); });
|
||||||
|
|
|
@ -20,9 +20,8 @@ ControllerDialog::ControllerDialog(Core::HID::HIDCore& hid_core_,
|
||||||
setWindowTitle(tr("Controller P1"));
|
setWindowTitle(tr("Controller P1"));
|
||||||
resize(500, 350);
|
resize(500, 350);
|
||||||
setMinimumSize(500, 350);
|
setMinimumSize(500, 350);
|
||||||
// Remove the "?" button from the titlebar and enable the maximize button
|
// Enable the maximize button
|
||||||
setWindowFlags((windowFlags() & ~Qt::WindowContextHelpButtonHint) |
|
setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint);
|
||||||
Qt::WindowMaximizeButtonHint);
|
|
||||||
|
|
||||||
widget = new PlayerControlPreview(this);
|
widget = new PlayerControlPreview(this);
|
||||||
refreshConfiguration();
|
refreshConfiguration();
|
||||||
|
|
|
@ -49,9 +49,8 @@ MicroProfileDialog::MicroProfileDialog(QWidget* parent) : QWidget(parent, Qt::Di
|
||||||
setObjectName(QStringLiteral("MicroProfile"));
|
setObjectName(QStringLiteral("MicroProfile"));
|
||||||
setWindowTitle(tr("&MicroProfile"));
|
setWindowTitle(tr("&MicroProfile"));
|
||||||
resize(1000, 600);
|
resize(1000, 600);
|
||||||
// Remove the "?" button from the titlebar and enable the maximize button
|
// Enable the maximize button
|
||||||
setWindowFlags((windowFlags() & ~Qt::WindowContextHelpButtonHint) |
|
setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint);
|
||||||
Qt::WindowMaximizeButtonHint);
|
|
||||||
|
|
||||||
#if MICROPROFILE_ENABLED
|
#if MICROPROFILE_ENABLED
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ InstallDialog::InstallDialog(QWidget* parent, const QStringList& files) : QDialo
|
||||||
vbox_layout->addLayout(hbox_layout);
|
vbox_layout->addLayout(hbox_layout);
|
||||||
|
|
||||||
setLayout(vbox_layout);
|
setLayout(vbox_layout);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
setWindowTitle(tr("Install Files to NAND"));
|
setWindowTitle(tr("Install Files to NAND"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2758,8 +2758,7 @@ void GMainWindow::OnMenuInstallToNAND() {
|
||||||
ui->action_Install_File_NAND->setEnabled(false);
|
ui->action_Install_File_NAND->setEnabled(false);
|
||||||
|
|
||||||
install_progress = new QProgressDialog(QString{}, tr("Cancel"), 0, total_size, this);
|
install_progress = new QProgressDialog(QString{}, tr("Cancel"), 0, total_size, this);
|
||||||
install_progress->setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint &
|
install_progress->setWindowFlags(windowFlags() & ~Qt::WindowMaximizeButtonHint);
|
||||||
~Qt::WindowMaximizeButtonHint);
|
|
||||||
install_progress->setAttribute(Qt::WA_DeleteOnClose, true);
|
install_progress->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
install_progress->setFixedWidth(installDialog.GetMinimumWidth() + 40);
|
install_progress->setFixedWidth(installDialog.GetMinimumWidth() + 40);
|
||||||
install_progress->show();
|
install_progress->show();
|
||||||
|
@ -4456,6 +4455,9 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Disables the "?" button on all dialogs.
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
||||||
|
|
||||||
// Enables the core to make the qt created contexts current on std::threads
|
// Enables the core to make the qt created contexts current on std::threads
|
||||||
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
|
@ -16,8 +16,6 @@ LimitableInputDialog::LimitableInputDialog(QWidget* parent) : QDialog{parent} {
|
||||||
LimitableInputDialog::~LimitableInputDialog() = default;
|
LimitableInputDialog::~LimitableInputDialog() = default;
|
||||||
|
|
||||||
void LimitableInputDialog::CreateUI() {
|
void LimitableInputDialog::CreateUI() {
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
|
|
||||||
text_label = new QLabel(this);
|
text_label = new QLabel(this);
|
||||||
text_entry = new QLineEdit(this);
|
text_entry = new QLineEdit(this);
|
||||||
text_label_invalid = new QLabel(this);
|
text_label_invalid = new QLabel(this);
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) {
|
SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) {
|
||||||
setWindowTitle(tr("Enter a hotkey"));
|
setWindowTitle(tr("Enter a hotkey"));
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
|
|
||||||
key_sequence = new QKeySequenceEdit;
|
key_sequence = new QKeySequenceEdit;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue