summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-01-29 09:42:01 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-01-29 09:42:01 (GMT)
commit11a7f5c48ea9c90e9adaaa06a96e0a9116234bff (patch)
tree5bfd85158edcd431ca4b2b60ece21f868b7fc1bf /Swift/QtUI
parent712c698cbc5cdb5e939629cf4b18b7944274abbd (diff)
downloadswift-11a7f5c48ea9c90e9adaaa06a96e0a9116234bff.zip
swift-11a7f5c48ea9c90e9adaaa06a96e0a9116234bff.tar.bz2
Aligning the 'new group' a bit more with the other checkboxes.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSetGroupsDialog.cpp27
1 files changed, 15 insertions, 12 deletions
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()));