summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-29 08:57:08 +0200
committerMontel Laurent <[email protected]>2017-05-29 08:57:08 +0200
commit00894b7baf3c9896e566f3119ad605aff272aa0e (patch)
tree0c0759da29836ee8b70798809b858116f36d7b96
parent3fcca363dbcbe1ae20f2c245dc63a5c172a6da1b (diff)
Fix layout
-rw-r--r--src/ksieveui/autocreatescripts/sieveforeverypartwidget.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ksieveui/autocreatescripts/sieveforeverypartwidget.cpp b/src/ksieveui/autocreatescripts/sieveforeverypartwidget.cpp
index 9d55019..44f28a7 100644
--- a/src/ksieveui/autocreatescripts/sieveforeverypartwidget.cpp
+++ b/src/ksieveui/autocreatescripts/sieveforeverypartwidget.cpp
@@ -39,20 +39,18 @@ using namespace KSieveUi;
SieveForEveryPartWidget::SieveForEveryPartWidget(QWidget *parent)
: SieveWidgetPageAbstract(parent)
{
- QVBoxLayout *topLayout = new QVBoxLayout(this);
-
- QWidget *w = new QWidget;
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QHBoxLayout *lay = new QHBoxLayout;
- lay->setMargin(0);
- w->setLayout(lay);
+ mainLayout->addLayout(lay);
+ mainLayout->addStretch(1);
mHelpButton = new SieveHelpButton;
- topLayout->addWidget(mHelpButton);
+ lay->addWidget(mHelpButton);
connect(mHelpButton, &SieveHelpButton::clicked, this, &SieveForEveryPartWidget::slotHelp);
mForLoop = new QCheckBox(i18n("Add ForEveryPart loop"));
connect(mForLoop, &QCheckBox::toggled, this, &SieveForEveryPartWidget::valueChanged);
- topLayout->addWidget(mForLoop);
+ lay->addWidget(mForLoop);
QLabel *lab = new QLabel(i18n("Name (optional):"));
lay->addWidget(lab);
@@ -62,7 +60,7 @@ SieveForEveryPartWidget::SieveForEveryPartWidget(QWidget *parent)
mName->setEnabled(false);
lay->addWidget(mName);
- topLayout->addWidget(w, 0, Qt::AlignTop);
+ //topLayout->addWidget(w, 0, Qt::AlignTop);
connect(mForLoop, &QCheckBox::clicked, mName, &QLineEdit::setEnabled);
setPageType(KSieveUi::SieveScriptBlockWidget::ForEveryPart);