[PATCH 2 of 5] (issue60) Make update list button less prominent and icon only

Wald Commits scm-commit at wald.intevation.org
Mon Jul 14 18:27:52 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# 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 @@
     <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>
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("<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 */


More information about the Trustbridge-commits mailing list