From db39286d0f762d84f78a55bda6f70ea0d29229ba Mon Sep 17 00:00:00 2001 From: Kevin Smith <git@kismith.co.uk> Date: Fri, 8 Oct 2010 10:24:41 +0100 Subject: Set the group window size appropriately. Resolves: #593 diff --git a/Swift/QtUI/QtSetGroupsDialog.cpp b/Swift/QtUI/QtSetGroupsDialog.cpp index 82a71a1..959e9cd 100644 --- a/Swift/QtUI/QtSetGroupsDialog.cpp +++ b/Swift/QtUI/QtSetGroupsDialog.cpp @@ -18,12 +18,20 @@ namespace Swift { QtSetGroupsDialog::QtSetGroupsDialog(ContactRosterItem* contact, const QList<QString>& allGroups) : contact_(contact) { + //resize(300,300); + setWindowTitle("Edit contact"); QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom, this); - QScrollArea* scroll = new QScrollArea(this); - layout->addWidget(scroll); + setContentsMargins(0,0,0,0); + QScrollArea* scrollArea = new QScrollArea(this); + layout->addWidget(scrollArea); + scrollArea->setWidgetResizable(true); + scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); + QWidget* scroll = new QWidget(scrollArea); + scrollArea->setWidget(scroll); QBoxLayout* scrollLayout = new QBoxLayout(QBoxLayout::TopToBottom, scroll); QLabel* label = new QLabel(scroll); - label->setText("Choose new groups for " + P2QSTRING(contact->getDisplayName())); + label->setText("Choose groups for " + P2QSTRING(contact->getDisplayName())); scrollLayout->addWidget(label); foreach (QString group, allGroups) { QCheckBox* check = new QCheckBox(scroll); -- cgit v0.10.2-6-g49f6