changeset 428:d1819cd56dee

Updated dialog layout.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 17 Apr 2014 13:16:43 +0200
parents d08e39b913ee
children f07bc5de2a87
files ui/aboutdialog.cpp ui/createcertlistdialog.cpp ui/createinstallerdialog.cpp
diffstat 3 files changed, 46 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/ui/aboutdialog.cpp	Thu Apr 17 12:56:23 2014 +0200
+++ b/ui/aboutdialog.cpp	Thu Apr 17 13:16:43 2014 +0200
@@ -68,6 +68,7 @@
     centerLayout->insertSpacing(2, 10);
     centerLayout->insertSpacing(4, 10);
     centerLayout->insertSpacing(6, 10);
+    centerLayout->insertStretch(8, 10);
 
     QPushButton *closeButton = new QPushButton(tr("Close"));
     connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
--- 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);
 
--- a/ui/createinstallerdialog.cpp	Thu Apr 17 12:56:23 2014 +0200
+++ b/ui/createinstallerdialog.cpp	Thu Apr 17 13:16:43 2014 +0200
@@ -29,11 +29,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 *archiveLayout = 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("Create binary installer") + "</h3>");
     QLabel *description = new QLabel(
@@ -46,42 +46,38 @@
     headerLayout->addWidget(header);
     headerLayout->addLayout(headerSubLayout);
     headerLayout->addWidget(headerSeparator);
+    headerLayout->insertSpacing(4, 10);
 
     QLabel *archiveLabel = new QLabel(tr("Select source archive:"));
-    archiveLabel->setFixedWidth(225);
+    QLabel *certLabel = new QLabel(tr("Select code signing certificate (secret key):"));
+    QLabel *saveLabel = new QLabel(tr("Select output folder:"));
+    labelLayout->addWidget(archiveLabel);
+    labelLayout->addWidget(certLabel);
+    labelLayout->addWidget(saveLabel);
+
     mArchiveFile = new QLineEdit();
+    mCertFile = new QLineEdit();
+    mSaveFile = new QLineEdit();
+    fieldLayout->addWidget(mArchiveFile);
+    fieldLayout->addWidget(mCertFile);
+    fieldLayout->addWidget(mSaveFile);
+
     QPushButton *archiveSelect = new QPushButton("...");
     connect(archiveSelect, SIGNAL(clicked()), this, SLOT(openArchiveSelect()));
     archiveSelect->setFixedWidth(30);
-    archiveLayout->addWidget(archiveLabel);
-    archiveLayout->addWidget(mArchiveFile);
-    archiveLayout->addWidget(archiveSelect);
-
-    QLabel *certLabel = new QLabel(tr("Select code signing certificate (secret key):"));
-    certLabel->setFixedWidth(225);
-    mCertFile = new QLineEdit();
     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(tr("Select output folder:"));
-    saveLabel->setFixedWidth(225);
-    mSaveFile = new QLineEdit();
     QPushButton *saveSelect = new QPushButton("...");
     connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation()));
     saveSelect->setFixedWidth(30);
-    saveLayout->addWidget(saveLabel);
-    saveLayout->addWidget(mSaveFile);
-    saveLayout->addWidget(saveSelect);
+    buttonLayout->addWidget(archiveSelect);
+    buttonLayout->addWidget(certSelect);
+    buttonLayout->addWidget(saveSelect);
 
-    centerLayout->insertSpacing(0, 10);
-    centerLayout->addLayout(archiveLayout);
-    centerLayout->addLayout(certLayout);
-    centerLayout->addLayout(saveLayout);
-    centerLayout->insertSpacing(4, 10);
+    centerLayout->addLayout(labelLayout);
+    centerLayout->addLayout(fieldLayout);
+    centerLayout->addLayout(buttonLayout);
 
     QPushButton *create = new QPushButton(tr("Create installer"));
     connect(create, SIGNAL(clicked()), this, SLOT(createInstaller()));
@@ -98,6 +94,7 @@
     topLayout->addLayout(headerLayout);
     topLayout->addLayout(centerLayout);
     topLayout->insertStretch(2, 10);
+    centerLayout->insertSpacing(3, 10);
     topLayout->addWidget(bottomSeparator);
     topLayout->addLayout(bottomLayout);
 

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