mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-28 18:46:11 +00:00
main: Globally disable the "?" button on dialogs (#6263)
Sets the AA_DisableWindowContextHelpButton attribute to disable this useless button globally. This is disabled by default on Qt6.
This commit is contained in:
parent
0f6478a928
commit
bb8cb3ff82
|
@ -17,7 +17,6 @@ CheatDialog::CheatDialog(QWidget* parent)
|
||||||
: QDialog(parent), ui(std::make_unique<Ui::CheatDialog>()) {
|
: QDialog(parent), ui(std::make_unique<Ui::CheatDialog>()) {
|
||||||
// Setup gui control settings
|
// Setup gui control settings
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
ui->tableCheats->setColumnWidth(0, 30);
|
ui->tableCheats->setColumnWidth(0, 30);
|
||||||
ui->tableCheats->setColumnWidth(2, 85);
|
ui->tableCheats->setColumnWidth(2, 85);
|
||||||
ui->tableCheats->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Fixed);
|
ui->tableCheats->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Fixed);
|
||||||
|
|
|
@ -20,8 +20,6 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry, bool
|
||||||
|
|
||||||
PopulateSelectionList();
|
PopulateSelectionList();
|
||||||
|
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
|
|
||||||
connect(ui->uiTab, &ConfigureUi::LanguageChanged, this, &ConfigureDialog::OnLanguageChanged);
|
connect(ui->uiTab, &ConfigureUi::LanguageChanged, this, &ConfigureDialog::OnLanguageChanged);
|
||||||
connect(ui->selectorList, &QListWidget::itemSelectionChanged, this,
|
connect(ui->selectorList, &QListWidget::itemSelectionChanged, this,
|
||||||
&ConfigureDialog::UpdateVisibleTabs);
|
&ConfigureDialog::UpdateVisibleTabs);
|
||||||
|
|
|
@ -41,8 +41,6 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const QString
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
scene = new QGraphicsScene;
|
scene = new QGraphicsScene;
|
||||||
ui->icon_view->setScene(scene);
|
ui->icon_view->setScene(scene);
|
||||||
|
|
|
@ -50,9 +50,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
|
||||||
|
|
||||||
|
|
|
@ -2644,6 +2644,10 @@ int main(int argc, char* argv[]) {
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
std::string bin_path = FileUtil::GetBundleDirectory() + DIR_SEP + "..";
|
std::string bin_path = FileUtil::GetBundleDirectory() + DIR_SEP + "..";
|
||||||
chdir(bin_path.c_str());
|
chdir(bin_path.c_str());
|
||||||
|
#endif
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
// Disables the "?" button on all dialogs. Disabled by default on Qt6.
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
||||||
#endif
|
#endif
|
||||||
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
||||||
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||||
|
|
|
@ -9,7 +9,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