changeset 414:3d803d383b41

Wording and layout in TrustBridge administration create binary dialog.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 16 Apr 2014 17:35:08 +0200
parents 860affe19416
children b19290d6b148
files ui/createinstallerdialog.cpp
diffstat 1 files changed, 29 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ui/createinstallerdialog.cpp	Wed Apr 16 17:23:57 2014 +0200
+++ b/ui/createinstallerdialog.cpp	Wed Apr 16 17:35:08 2014 +0200
@@ -18,27 +18,36 @@
 CreateInstallerDialog::CreateInstallerDialog(QMainWindow *parent) :
     QDialog(parent)
 {
-    setWindowTitle(tr("adminstrator - Create signed installer binary"));
+    setWindowTitle(tr("Create binary installer"));
     setupGUI();
+    resize(500, 250);
 }
 
 void CreateInstallerDialog::setupGUI()
 {
     /* Top level layout / widgets */
     QVBoxLayout *topLayout = new QVBoxLayout;
-    QHBoxLayout *headerLayout = new QHBoxLayout;
+    QVBoxLayout *headerLayout = new QVBoxLayout;
+    QHBoxLayout *headerSubLayout = new QHBoxLayout;
     QVBoxLayout *centerLayout = new QVBoxLayout;
     QHBoxLayout *bottomLayout = new QHBoxLayout;
     QHBoxLayout *archiveLayout = new QHBoxLayout;
     QHBoxLayout *certLayout = new QHBoxLayout;
     QHBoxLayout *saveLayout = new QHBoxLayout;
 
-    QString descString = tr("Create a new signed installer binary.\n");
-    descString.append("Select the archive, certificate and destination directory.");
-    QLabel *description = new QLabel(descString);
-    headerLayout->addWidget(description);
+    QLabel *header = new QLabel("<h3>" + tr("Create binary installer") + "</h3>");
+    QLabel *description = new QLabel(
+        tr("Create and signed a TrustBridge binary installer from source."));
+    headerSubLayout->insertSpacing(0, 40);
+    headerSubLayout->addWidget(description);
+    QFrame *headerSeparator = new QFrame();
+    headerSeparator->setFrameShape(QFrame::HLine);
+    headerSeparator->setFrameShadow(QFrame::Sunken);
+    headerLayout->addWidget(header);
+    headerLayout->addLayout(headerSubLayout);
+    headerLayout->addWidget(headerSeparator);
 
-    QLabel *archiveLabel = new QLabel("Select source archive:");
+    QLabel *archiveLabel = new QLabel(tr("Select source archive:"));
     archiveLabel->setFixedWidth(140);
     mArchiveFile = new QLineEdit();
     QPushButton *archiveSelect = new QPushButton("...");
@@ -48,7 +57,7 @@
     archiveLayout->addWidget(mArchiveFile);
     archiveLayout->addWidget(archiveSelect);
 
-    QLabel *certLabel = new QLabel("Select certificate:");
+    QLabel *certLabel = new QLabel(tr("Select code signing certificate (secret key):"));
     certLabel->setFixedWidth(140);
     mCertFile = new QLineEdit();
     QPushButton *certSelect = new QPushButton("...");
@@ -58,7 +67,7 @@
     certLayout->addWidget(mCertFile);
     certLayout->addWidget(certSelect);
 
-    QLabel *saveLabel = new QLabel("Select target location:");
+    QLabel *saveLabel = new QLabel(tr("Select output folder:"));
     saveLabel->setFixedWidth(140);
     mSaveFile = new QLineEdit();
     QPushButton *saveSelect = new QPushButton("...");
@@ -68,18 +77,28 @@
     saveLayout->addWidget(mSaveFile);
     saveLayout->addWidget(saveSelect);
 
+    centerLayout->insertSpacing(0, 10);
     centerLayout->addLayout(archiveLayout);
     centerLayout->addLayout(certLayout);
     centerLayout->addLayout(saveLayout);
+    centerLayout->insertSpacing(4, 10);
 
-    QPushButton *create = new QPushButton(tr("Create Installer"));
+    QPushButton *create = new QPushButton(tr("Create installer"));
     connect(create, SIGNAL(clicked()), this, SLOT(createInstaller()));
+    QPushButton *cancel = new QPushButton(tr("Cancel"));
+    connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
     bottomLayout->insertStretch(0, 10);
     bottomLayout->addWidget(create);
+    bottomLayout->addWidget(cancel);
+
+    QFrame *bottomSeparator = new QFrame();
+    bottomSeparator->setFrameShape(QFrame::HLine);
+    bottomSeparator->setFrameShadow(QFrame::Sunken);
 
     topLayout->addLayout(headerLayout);
     topLayout->addLayout(centerLayout);
     topLayout->insertStretch(2, 10);
+    topLayout->addWidget(bottomSeparator);
     topLayout->addLayout(bottomLayout);
 
     setLayout(topLayout);

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