Mercurial > trustbridge
changeset 787:07cc0aabf782
(issue60) Make update list button less prominent and icon only
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 14 Jul 2014 16:07:55 +0200 |
parents | 4eff77851e76 |
children | 5ab7441dcda9 |
files | ui/icons.qrc ui/img/edit-find.png ui/img/update-list.png ui/mainwindow.cpp |
diffstat | 4 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/icons.qrc Mon Jul 14 15:51:48 2014 +0200 +++ b/ui/icons.qrc Mon Jul 14 16:07:55 2014 +0200 @@ -14,10 +14,10 @@ <file>img/dialog-warning.png</file> <file>img/dialog-information.png</file> <file>img/application-exit.png</file> - <file>img/edit-find.png</file> <file>img/security-low.png</file> <file>img/security-medium.png</file> <file>img/security-high.png</file> <file>img/trash-empty.png</file> + <file>img/update-list.png</file> </qresource> </RCC>
--- a/ui/mainwindow.cpp Mon Jul 14 15:51:48 2014 +0200 +++ b/ui/mainwindow.cpp Mon Jul 14 16:07:55 2014 +0200 @@ -513,6 +513,7 @@ QGridLayout *updatesHeaderLayout = new QGridLayout; /* Header 1: Update date and search button */ + QHBoxLayout *updateDateAndSearchButton = new QHBoxLayout; mUpdatesHeader = new QLabel("<h2>" + tr("Certificates unchanged")+ "</h2>"); mLastCertUpdate = @@ -523,6 +524,7 @@ mSoftwareVersionLabel = new QLabel(tr("TrustBridge Version:")); mSoftwareVersionContents = new QLabel(QApplication::applicationVersion()); + const QDateTime lastCheck = mSettings.value("lastUpdateCheck").toDateTime().toLocalTime(); if (lastCheck.isValid()) { const QString lastUpdateCheck = QLocale::system().toString(lastCheck, DATETIME_FORMAT); @@ -535,21 +537,26 @@ mLastUpdateCheck->hide(); mLastUpdateCheckContents->hide(); } - QPushButton *searchUpdates = new QPushButton(" " + tr("Check for updates")); - searchUpdates->setIcon(QIcon(":/img/edit-find.png")); + QPushButton *searchUpdates = new QPushButton(); + searchUpdates->setStyleSheet("QPushButton {border-style: outset; border-width: 0px;}"); + searchUpdates->setToolTip(tr("Check for updates")); + searchUpdates->setIcon(QIcon(":/img/update-list.png")); connect(searchUpdates, SIGNAL(clicked()), this, SLOT(checkUpdates())); + updateDateAndSearchButton->addWidget(mLastUpdateCheckContents); + updateDateAndSearchButton->addWidget(searchUpdates); // addWidget(*Widget, row, column, rowspan, colspan, [Qt::Alignment]) updatesHeaderLayout->addWidget(mUpdatesHeader, 0, 0, 1, 2); updatesHeaderLayout->addWidget(mSoftwareVersionLabel, 1, 0, 1, 1); updatesHeaderLayout->addWidget(mSoftwareVersionContents, 1, 1, 1, 1); updatesHeaderLayout->addWidget(mLastUpdateCheck, 2, 0, 1, 1); - updatesHeaderLayout->addWidget(mLastUpdateCheckContents, 2, 1, 1, 1); + updatesHeaderLayout->addLayout(updateDateAndSearchButton, 2, 1, 1, 1); +// updatesHeaderLayout->addWidget(mLastUpdateCheckContents, 2, 1, 1, 1); updatesHeaderLayout->addWidget(mLastCertUpdate, 3, 0, 1, 1); updatesHeaderLayout->addWidget(mLastCertUpdateContents, 3, 1, 1, 1); updatesHeaderLayout->setColumnStretch(3, 1); - updatesHeaderLayout->addWidget(searchUpdates, 1, 4, 1, 2, Qt::AlignRight); +// updatesHeaderLayout->addWidget(searchUpdates, 1, 4, 1, 2, Qt::AlignRight); updatesHeaderLayout->setRowMinimumHeight(4, 15); /* Header 2: Action text and buttons */