From c41a07b534b32a9e7cfbf58d05ecfac99b82e36d Mon Sep 17 00:00:00 2001 From: nils Date: Tue, 15 Nov 2011 17:17:45 +0000 Subject: beautified button position in wizard git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@618 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- wizard.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'wizard.cpp') diff --git a/wizard.cpp b/wizard.cpp index 84b8657..2d903a3 100644 --- a/wizard.cpp +++ b/wizard.cpp @@ -75,11 +75,15 @@ KeyGenPage::KeyGenPage(GpgME::GpgContext *ctx, QWidget *parent) QLabel *linkLabel = new QLabel(""+tr("Online tutorial")+""); linkLabel->setOpenExternalLinks(true); + QWidget *createKeyButtonBox = new QWidget(this); + QHBoxLayout *createKeyButtonBoxLayout = new QHBoxLayout(createKeyButtonBox); createKeyButton = new QPushButton(tr("Create New Key")); + createKeyButtonBoxLayout->addWidget(createKeyButton); + createKeyButtonBoxLayout->addStretch(1); layout = new QVBoxLayout(); layout->addWidget(topLabel); layout->addWidget(linkLabel); - layout->addWidget(createKeyButton); + layout->addWidget(createKeyButtonBox); connect(createKeyButton, SIGNAL(clicked()), this, SLOT(generateKeyDialog())); setLayout(layout); @@ -116,6 +120,7 @@ ImportPage::ImportPage(GpgME::GpgContext *ctx, QWidget *parent) QHBoxLayout *privHBoxLayout = new QHBoxLayout(); privHBoxLayout->addWidget(privateKeysCheckBox); privHBoxLayout->addWidget(privateKeysLabel); + privHBoxLayout->addStretch(1); privHBox->setLayout(privHBoxLayout); // Layout for public keys @@ -125,15 +130,24 @@ ImportPage::ImportPage(GpgME::GpgContext *ctx, QWidget *parent) QHBoxLayout *pubHBoxLayout = new QHBoxLayout(); pubHBoxLayout->addWidget(publicKeysCheckBox); pubHBoxLayout->addWidget(publicKeysLabel); + pubHBoxLayout->addStretch(1); pubHBox->setLayout(pubHBoxLayout); + QWidget *importKeyButtonBox = new QWidget(this); + QHBoxLayout *importKeyButtonBoxLayout = new QHBoxLayout(importKeyButtonBox); importKeyButton = new QPushButton(tr("Import keys")); + connect(importKeyButton, SIGNAL(clicked()), this, SLOT(importKeys())); + + importKeyButtonBoxLayout->addStretch(1); + importKeyButtonBoxLayout->addWidget(importKeyButton); + + layout = new QVBoxLayout(); layout->addWidget(topLabel); layout->addWidget(privHBox); layout->addWidget(pubHBox); - layout->addWidget(importKeyButton); - connect(importKeyButton, SIGNAL(clicked()), this, SLOT(importKeys())); + layout->addWidget(importKeyButtonBox); + setLayout(layout); } -- cgit v1.2.3