From 11a7f5c48ea9c90e9adaaa06a96e0a9116234bff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sat, 29 Jan 2011 10:42:01 +0100
Subject: Aligning the 'new group' a bit more with the other checkboxes.


diff --git a/Swift/QtUI/QtSetGroupsDialog.cpp b/Swift/QtUI/QtSetGroupsDialog.cpp
index fa1029e..d19a55d 100644
--- a/Swift/QtUI/QtSetGroupsDialog.cpp
+++ b/Swift/QtUI/QtSetGroupsDialog.cpp
@@ -29,29 +29,32 @@ QtSetGroupsDialog::QtSetGroupsDialog(ContactRosterItem* contact, const QList<QSt
 	scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
 	QWidget* scroll = new QWidget(scrollArea);
 	scrollArea->setWidget(scroll);
-	QBoxLayout* scrollLayout = new QBoxLayout(QBoxLayout::TopToBottom, scroll);
+	QVBoxLayout* scrollLayout = new QVBoxLayout(scroll);
 	QLabel* label = new QLabel(scroll);
 	label->setText("Choose groups for " + P2QSTRING(contact->getDisplayName()) + " (" + P2QSTRING(contact->getJID().toString()) + ")");
 	scrollLayout->addWidget(label);
 	foreach (QString group, allGroups) {
-			QCheckBox* check = new QCheckBox(scroll);
-			check->setText(group);
-			check->setCheckState(Qt::Unchecked);
-			checkBoxes_[Q2PSTRING(group)] = check;
-			scrollLayout->addWidget(check);
-		}
+		QCheckBox* check = new QCheckBox(scroll);
+		check->setText(group);
+		check->setCheckState(Qt::Unchecked);
+		checkBoxes_[Q2PSTRING(group)] = check;
+		scrollLayout->addWidget(check);
+	}
 	foreach (String group, contact->getGroups()) {
 		checkBoxes_[group]->setCheckState(Qt::Checked);
 	}
-	QWidget* newGroupWidget = new QWidget(scroll);
-	QBoxLayout* newGroupLayout = new QBoxLayout(QBoxLayout::LeftToRight, newGroupWidget);
-	scrollLayout->addWidget(newGroupWidget);
-	newGroup_ = new QCheckBox(newGroupWidget);
+
+	QHBoxLayout* newGroupLayout = new QHBoxLayout();
+	newGroup_ = new QCheckBox(scroll);
 	newGroup_->setText("New Group:");
 	newGroup_->setCheckState(Qt::Unchecked);
 	newGroupLayout->addWidget(newGroup_);
-	newGroupName_ = new QLineEdit(newGroupWidget);
+	newGroupName_ = new QLineEdit(scroll);
 	newGroupLayout->addWidget(newGroupName_);
+	scrollLayout->addLayout(newGroupLayout);
+
+	scrollLayout->addItem(new QSpacerItem(20, 73, QSizePolicy::Minimum, QSizePolicy::Expanding));
+
 	QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
 	layout->addWidget(buttons);
 	connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
-- 
cgit v0.10.2-6-g49f6