From 6775e3e72ba785f85c21eed97121051bbb5ab353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 11 Apr 2015 12:30:18 +0200 Subject: NOISSUE Improve new instance dialog Better layout, showing more of the modpack URL Fixed logic for enabling OK button --- gui/dialogs/NewInstanceDialog.cpp | 9 ++--- gui/dialogs/NewInstanceDialog.ui | 77 +++++++++++++++++++++++---------------- 2 files changed, 49 insertions(+), 37 deletions(-) diff --git a/gui/dialogs/NewInstanceDialog.cpp b/gui/dialogs/NewInstanceDialog.cpp index 51060ad2..adb5c950 100644 --- a/gui/dialogs/NewInstanceDialog.cpp +++ b/gui/dialogs/NewInstanceDialog.cpp @@ -98,11 +98,10 @@ NewInstanceDialog::~NewInstanceDialog() void NewInstanceDialog::updateDialogState() { - ui->buttonBox->button(QDialogButtonBox::Ok) - ->setEnabled(!instName().isEmpty() - && m_selectedVersion - && (!ui->modpackBox->isChecked() - || ui->modpackEdit->hasAcceptableInput())); + bool allowOK = !instName().isEmpty() && + (ui->versionBox->isChecked() && m_selectedVersion || + (ui->modpackBox->isChecked() && ui->modpackEdit->hasAcceptableInput())); + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(allowOK); } void NewInstanceDialog::setSelectedVersion(BaseVersionPtr version, bool initial) diff --git a/gui/dialogs/NewInstanceDialog.ui b/gui/dialogs/NewInstanceDialog.ui index adb7fa54..6cb0c97c 100644 --- a/gui/dialogs/NewInstanceDialog.ui +++ b/gui/dialogs/NewInstanceDialog.ui @@ -9,8 +9,8 @@ 0 0 - 345 - 343 + 277 + 404 @@ -83,15 +83,8 @@ - - - - - ... - - - - + + &Group: @@ -101,7 +94,7 @@ - + @@ -114,46 +107,57 @@ - - + + + + + + false - http:// + ... - - + + false - ... + http:// - - - - &Version: - - + + + true - + + + + ... + + + + - Import &Modpack: + Impor&t Modpack (local file or link): - - - + + + + Vani&lla Minecraft (select version): + + true @@ -192,9 +196,18 @@ - - - + + instNameTextBox + groupBox + versionBox + versionTextBox + btnChangeVersion + modpackBox + modpackEdit + modpackBtn + iconButton + + buttonBox -- cgit v1.2.3