From 55349d03c72de32159eab8bbaf36ef3504572c92 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 12 Jan 2012 23:43:24 +0100 Subject: Improved the layout of the custom server dialog Reviewed-by: Yohann Ferreira --- src/gui/customserverdialog.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gui/customserverdialog.cpp b/src/gui/customserverdialog.cpp index 589440a2..5376248a 100644 --- a/src/gui/customserverdialog.cpp +++ b/src/gui/customserverdialog.cpp @@ -45,7 +45,7 @@ std::string TypeListModel::getElementAt(int elementIndex) } CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index): - Window(_("Add a custom Server"), true, static_cast(parent)), + Window(_("Add a custom Server"), true, parent), mServerDialog(parent), mIndex(index) { @@ -73,25 +73,25 @@ CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index): mPortField->addActionListener(this); place(0, 0, nameLabel); - place(1, 0, mNameField, 3).setPadding(3); + place(1, 0, mNameField, 4).setPadding(3); place(0, 1, serverAdressLabel); - place(1, 1, mServerAddressField, 3).setPadding(3); + place(1, 1, mServerAddressField, 4).setPadding(3); place(0, 2, portLabel); - place(1, 2, mPortField, 3).setPadding(3); + place(1, 2, mPortField, 4).setPadding(3); place(0, 3, typeLabel); - place(3, 3, mTypeField, 1).setPadding(3); + place(1, 3, mTypeField).setPadding(3); place(0, 4, descriptionLabel); - place(1, 4, mDescriptionField, 3).setPadding(3); - place(3, 5, mOkButton); - place(2, 5, mCancelButton); + place(1, 4, mDescriptionField, 4).setPadding(3); + place(4, 5, mOkButton); + place(3, 5, mCancelButton); // Do this manually instead of calling reflowLayout so we can enforce a // minimum width. int width = 0, height = 0; getLayout().reflow(width, height); - if (width < 400) + if (width < 300) { - width = 400; + width = 300; getLayout().reflow(width, height); } if (height < 120) -- cgit v1.2.3-60-g2f50