diff ui/createcertlistdialog.cpp @ 428:d1819cd56dee

Updated dialog layout.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 17 Apr 2014 13:16:43 +0200
parents d7cda835abd6
children efd1bd85112f
line wrap: on
line diff
--- a/ui/createcertlistdialog.cpp	Thu Apr 17 12:56:23 2014 +0200
+++ b/ui/createcertlistdialog.cpp	Thu Apr 17 13:16:43 2014 +0200
@@ -30,10 +30,11 @@
     QVBoxLayout *topLayout = new QVBoxLayout;
     QVBoxLayout *headerLayout = new QVBoxLayout;
     QHBoxLayout *headerSubLayout = new QHBoxLayout;
-    QVBoxLayout *centerLayout = new QVBoxLayout;
+    QHBoxLayout *centerLayout = new QHBoxLayout;
     QHBoxLayout *bottomLayout = new QHBoxLayout;
-    QHBoxLayout *certLayout = new QHBoxLayout;
-    QHBoxLayout *saveLayout = new QHBoxLayout;
+    QVBoxLayout *labelLayout = new QVBoxLayout;
+    QVBoxLayout *fieldLayout = new QVBoxLayout;
+    QVBoxLayout *buttonLayout = new QVBoxLayout;
 
     QLabel *header = new QLabel("<h3>" + tr("Save certificate list") + "</h3>");
     QLabel *description = new QLabel(
@@ -46,23 +47,26 @@
     headerLayout->addWidget(header);
     headerLayout->addLayout(headerSubLayout);
     headerLayout->addWidget(headerSeparator);
+    headerLayout->insertSpacing(3, 10);
 
     QLabel *certLabel = new QLabel("Select signature certificate (secret key):");
-    certLabel->setFixedWidth(205);
+    QLabel *saveLabel = new QLabel("Select output folder:");
+    labelLayout->addWidget(certLabel);
+    labelLayout->addWidget(saveLabel);
+
     mCertFile = new QLineEdit();
+    mSaveFile = new QLineEdit();
+    fieldLayout->addWidget(mCertFile);
+    fieldLayout->addWidget(mSaveFile);
+
     QPushButton *certSelect = new QPushButton("...");
-    connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect()));
     certSelect->setFixedWidth(30);
-    certLayout->addWidget(certLabel);
-    certLayout->addWidget(mCertFile);
-    certLayout->addWidget(certSelect);
-
-    QLabel *saveLabel = new QLabel("Select output folder:");
-    saveLabel->setFixedWidth(205);
-    mSaveFile = new QLineEdit();
+    connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect()));
     QPushButton *saveSelect = new QPushButton("...");
     connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation()));
     saveSelect->setFixedWidth(30);
+    buttonLayout->addWidget(certSelect);
+    buttonLayout->addWidget(saveSelect);
 
     QString footerText = tr("In addition, each certificate list will be saved "
         "automatically in the archive directory:\n");
@@ -71,16 +75,12 @@
         QStandardPaths::DataLocation));
     //footerText.append(QStandardPaths::displayName(QStandardPaths::DataLocation));
     QLabel *footer = new QLabel(footerText);
-    saveLayout->addWidget(saveLabel);
-    saveLayout->addWidget(mSaveFile);
-    saveLayout->addWidget(saveSelect);
 
-    centerLayout->insertSpacing(0, 10);
-    centerLayout->addLayout(certLayout);
-    centerLayout->addLayout(saveLayout);
-    centerLayout->insertSpacing(3, 10);
+    centerLayout->addLayout(labelLayout);
+    centerLayout->addLayout(fieldLayout);
+    centerLayout->addLayout(buttonLayout);
 
-    QPushButton *create = new QPushButton(tr("Sign list"));
+    QPushButton *create = new QPushButton(tr("Save list"));
     connect(create, SIGNAL(clicked()), this, SLOT(createList()));
     QPushButton *cancel = new QPushButton(tr("Cancel"));
     connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
@@ -96,6 +96,7 @@
     topLayout->addLayout(centerLayout);
     topLayout->insertStretch(2, 10);
     topLayout->addWidget(footer);
+    topLayout->insertSpacing(4, 10);
     topLayout->addWidget(bottomSeparator);
     topLayout->addLayout(bottomLayout);
 

http://wald.intevation.org/projects/trustbridge/