changeset 210:9c51c472e596

Some mainwindow layout improvements and new icons for certificate list.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 27 Mar 2014 09:04:16 +0100
parents f84d9ad9bfa9
children be628d261617
files ui/mainwindow.cpp
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Thu Mar 27 09:00:32 2014 +0100
+++ b/ui/mainwindow.cpp	Thu Mar 27 09:04:16 2014 +0100
@@ -238,14 +238,15 @@
     QImage *logoImage = new QImage(":/img/logo.png");
     QLabel *logo = new QLabel;
     logo->setBackgroundRole(QPalette::Base);
-    logo->setScaledContents(true);
     logo->setPixmap(QPixmap::fromImage(*logoImage));
-    QLabel *title = new QLabel("<h3>" + tr("Certificate Installer") + "</h3>");
+    QLabel *title = new QLabel("<h2>" + tr("Certificate Installer") + "</h2>");
     QLabel *subTitle = new QLabel("This Software installs and removes Certificates");
     headerTextLayout->addWidget(title);
     headerTextLayout->addWidget(subTitle);
     headerLayout->addWidget(logo);
     headerLayout->addLayout(headerTextLayout);
+    headerLayout->setStretch(0, 0);
+    headerLayout->setStretch(1, 10);
 
     QGroupBox *certBox = new QGroupBox(tr("Managed Certificates"));
     certificateList = new QListWidget;
@@ -266,6 +267,8 @@
     mainLayout->addLayout(headerLayout);
     mainLayout->addWidget(certBox);
     mainLayout->addLayout(bottomLayout);
+    mainLayout->setStretch(0, 0);
+    mainLayout->setStretch(1, 10);
 
     // QMainWindow allready has a layout. All child layouts and widgets are
     // managed in the central widget.
@@ -284,7 +287,7 @@
         }
         QListWidgetItem* item = new QListWidgetItem(cert.shortDescription());
         item->setData(Qt::UserRole, cert.details());
-        QIcon *certIcon = new QIcon(":/img/tray_22.png");
+        QIcon *certIcon = new QIcon(":/img/list-add.png");
         item->setIcon(*certIcon);
         certificateList->addItem(item);
     }
@@ -295,7 +298,7 @@
         }
         QListWidgetItem* item = new QListWidgetItem(cert.shortDescription());
         item->setData(Qt::UserRole, cert.details());
-        QIcon *certIcon = new QIcon(":/img/tray_22.png");
+        QIcon *certIcon = new QIcon(":/img/list-remove.png");
         item->setIcon(*certIcon);
         certificateList->addItem(item);
     }
@@ -324,5 +327,6 @@
 {
     qDebug() << "show details";
     QString details = item->data(Qt::UserRole).toString();
+    details.append("\rInstalled: 1.1.1971\rRemoved: 1.1.1971");
     certificateDetails->setPlainText(details);
 }

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