[PATCH 3 of 5] Updated dialog layout

Wald Commits scm-commit at wald.intevation.org
Thu Apr 17 13:23:36 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1397733403 -7200
# Node ID d1819cd56dee02bb84ef25400a6495479810c55c
# Parent  d08e39b913eea2b7bc3a0ed7bedfd8b5de640690
Updated dialog layout.

diff -r d08e39b913ee -r d1819cd56dee ui/aboutdialog.cpp
--- 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()));
diff -r d08e39b913ee -r d1819cd56dee ui/createcertlistdialog.cpp
--- 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("...");
+    certSelect->setFixedWidth(30);
     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();
     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);
 
diff -r d08e39b913ee -r d1819cd56dee ui/createinstallerdialog.cpp
--- 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);
 


More information about the Trustbridge-commits mailing list