From 840dba26bacd044164d3236218e42f441433252c Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 7 Jun 2019 19:55:41 -0400 Subject: rework of the executables dialog to have a horizontal splitter and use a standard QDialogButtonBox --- src/editexecutablesdialog.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/editexecutablesdialog.cpp') diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index a3b2808a..559bc8f0 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -42,6 +42,9 @@ EditExecutablesDialog::EditExecutablesDialog( , m_GamePlugin(game) { ui->setupUi(this); + ui->splitter->setSizes({200, 1}); + ui->splitter->setStretchFactor(0, 0); + ui->splitter->setStretchFactor(1, 1); refreshExecutablesWidget(); @@ -367,8 +370,10 @@ void EditExecutablesDialog::on_overwriteAppIDBox_toggled(bool checked) ui->appIDOverwriteEdit->setEnabled(checked); } -void EditExecutablesDialog::on_closeButton_clicked() +void EditExecutablesDialog::on_buttonBox_clicked(QAbstractButton*) { + // there's only a close button for now, so the actual button doesn't matter + if (executableChanged()) { QMessageBox::StandardButton res = QMessageBox::question(this, tr("Save Changes?"), tr("You made changes to the current executable, do you want to save them?"), @@ -382,7 +387,8 @@ void EditExecutablesDialog::on_closeButton_clicked() refreshExecutablesWidget(); } } - this->accept(); + + accept(); } void EditExecutablesDialog::on_executablesListBox_clicked(const QModelIndex ¤t) -- cgit v1.3.1