# HG changeset patch # User Raimund Renkert # Date 1395907456 -3600 # Node ID 9c51c472e5964923b8481c48140d2c202fb2d9b4 # Parent f84d9ad9bfa945056d3ca1092787c1f23fe5e4d7 Some mainwindow layout improvements and new icons for certificate list. diff -r f84d9ad9bfa9 -r 9c51c472e596 ui/mainwindow.cpp --- 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("

" + tr("Certificate Installer") + "

"); + QLabel *title = new QLabel("

" + tr("Certificate Installer") + "

"); 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); }