Merge pull request #6478 from spycrab/qt_default_btns

Qt: Replace "OK" with "Close" buttons
This commit is contained in:
Léo Lam
2018-03-26 22:48:26 +02:00
committed by GitHub
7 changed files with 21 additions and 21 deletions

View File

@ -24,7 +24,6 @@ GraphicsWindow::GraphicsWindow(X11Utils::XRRConfiguration* xrr_config, MainWindo
: QDialog(parent), m_xrr_config(xrr_config)
{
CreateMainLayout();
ConnectWidgets();
setWindowTitle(tr("Graphics"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@ -40,7 +39,9 @@ void GraphicsWindow::CreateMainLayout()
m_description =
new QLabel(tr("Move the mouse pointer over an option to display a detailed description."));
m_tab_widget = new QTabWidget();
m_button_box = new QDialogButtonBox(QDialogButtonBox::Ok);
m_button_box = new QDialogButtonBox(QDialogButtonBox::Close);
connect(m_button_box, &QDialogButtonBox::rejected, this, &QDialog::reject);
description_box->setLayout(description_layout);
description_box->setFixedHeight(230);
@ -82,11 +83,6 @@ void GraphicsWindow::CreateMainLayout()
setLayout(main_layout);
}
void GraphicsWindow::ConnectWidgets()
{
connect(m_button_box, &QDialogButtonBox::accepted, this, &QDialog::accept);
}
void GraphicsWindow::OnBackendChanged(const QString& backend)
{
setWindowTitle(tr("Dolphin %1 Graphics Configuration").arg(backend));