# HG changeset patch # User Andre Heinecke # Date 1405346875 -7200 # Node ID 07cc0aabf78253d49eb1932430dbc9db708dde17 # Parent 4eff77851e768f1a4705b221798aca48e899fefb (issue60) Make update list button less prominent and icon only diff -r 4eff77851e76 -r 07cc0aabf782 ui/icons.qrc --- 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 @@ img/dialog-warning.png img/dialog-information.png img/application-exit.png - img/edit-find.png img/security-low.png img/security-medium.png img/security-high.png img/trash-empty.png + img/update-list.png diff -r 4eff77851e76 -r 07cc0aabf782 ui/img/edit-find.png Binary file ui/img/edit-find.png has changed diff -r 4eff77851e76 -r 07cc0aabf782 ui/img/update-list.png Binary file ui/img/update-list.png has changed diff -r 4eff77851e76 -r 07cc0aabf782 ui/mainwindow.cpp --- 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("

" + tr("Certificates unchanged")+ "

"); 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 */