changeset 845:d33834129d2a

(issue59) Improve details button.
author Emanuel Schuetze <emanuel@intevation.de>
date Wed, 30 Jul 2014 15:01:34 +0200
parents fa68e5aeeaac
children f3d332c91b03
files ui/icons.qrc ui/img/arrow-down-double.png ui/img/arrow-left-double.png ui/img/dialog-information_16px.png ui/img/dialog-information_grey_16px.png ui/mainwindow.cpp
diffstat 6 files changed, 24 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/ui/icons.qrc	Wed Jul 30 10:44:52 2014 +0200
+++ b/ui/icons.qrc	Wed Jul 30 15:01:34 2014 +0200
@@ -13,13 +13,13 @@
     <file>img/document-encrypt.png</file>
     <file>img/dialog-warning.png</file>
     <file>img/dialog-information.png</file>
+    <file>img/dialog-information_16px.png</file>
+    <file>img/dialog-information_grey_16px.png</file>
     <file>img/application-exit.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>
-    <file>img/arrow-left-double.png</file>
-    <file>img/arrow-down-double.png</file>
 </qresource>
 </RCC>
Binary file ui/img/arrow-down-double.png has changed
Binary file ui/img/arrow-left-double.png has changed
Binary file ui/img/dialog-information_16px.png has changed
Binary file ui/img/dialog-information_grey_16px.png has changed
--- a/ui/mainwindow.cpp	Wed Jul 30 10:44:52 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Jul 30 15:01:34 2014 +0200
@@ -537,6 +537,7 @@
     QPushButton *searchUpdates = new QPushButton(" " + tr("Update"));
     searchUpdates->setFixedHeight(22);
     searchUpdates->setToolTip(tr("Check for Updates"));
+    searchUpdates->setStyleSheet("font-size: 10px;");
     searchUpdates->setIcon(QIcon(":/img/update-list.png"));
     connect(searchUpdates, SIGNAL(clicked()), this, SLOT(checkUpdates()));
     updateDateAndSearchButton->addWidget(mLastUpdateCheckContents);
@@ -596,9 +597,11 @@
             tr("Install new trusted certificates (%1/%2)").arg(0).arg(0) +
             "</h3>");
     mUpdatesDetailsNew = new QPushButton();
+    mUpdatesDetailsNew->setText(" " + tr("Details"));
     mUpdatesDetailsNew->setToolTip(tr("Show details"));
-    mUpdatesDetailsNew->setStyleSheet("QPushButton {border-style: outset; border-width: 0px;}");
-    mUpdatesDetailsNew->setIcon(QIcon(":/img/arrow-left-double.png"));
+    mUpdatesDetailsNew->setStyleSheet("font-size: 10px;");
+    mUpdatesDetailsNew->setFixedHeight(22);
+    mUpdatesDetailsNew->setIcon(QIcon(":/img/dialog-information_16px.png"));
     connect(mUpdatesDetailsNew,
         SIGNAL(clicked()),
         this,
@@ -616,9 +619,11 @@
             tr("Remove revoked certificates (%1/%2)").arg(0).arg(0) +
             "</h3>");
     mUpdatesDetailsRemove = new QPushButton();
+    mUpdatesDetailsRemove->setText(" " + tr("Details"));
     mUpdatesDetailsRemove->setToolTip(tr("Show details"));
-    mUpdatesDetailsRemove->setStyleSheet("QPushButton {border-style: outset; border-width: 0px;}");
-    mUpdatesDetailsRemove->setIcon(QIcon(":/img/arrow-left-double.png"));
+    mUpdatesDetailsRemove->setStyleSheet("font-size: 10px;");
+    mUpdatesDetailsRemove->setFixedHeight(22);
+    mUpdatesDetailsRemove->setIcon(QIcon(":/img/dialog-information_16px.png"));
     connect(mUpdatesDetailsRemove,
         SIGNAL(clicked()),
         this,
@@ -636,9 +641,11 @@
             tr("Manually changed certificates (%1)").arg(0) +
             "</h3>");
     mUpdatesDetailsManual = new QPushButton();
+    mUpdatesDetailsManual->setText(" " + tr("Details"));
     mUpdatesDetailsManual->setToolTip(tr("Show details"));
-    mUpdatesDetailsManual->setStyleSheet("QPushButton {border-style: outset; border-width: 0px;}");
-    mUpdatesDetailsManual->setIcon(QIcon(":/img/arrow-left-double.png"));
+    mUpdatesDetailsManual->setStyleSheet("font-size: 10px;");
+    mUpdatesDetailsManual->setFixedHeight(22);
+    mUpdatesDetailsManual->setIcon(QIcon(":/img/dialog-information_16px.png"));
     connect(mUpdatesDetailsManual,
         SIGNAL(clicked()),
         this,
@@ -925,7 +932,7 @@
 
     if (mUpdatesManual->certificates().size()) {
         mUpdatesDetailsManual->show();
-        mUpdatesDetailsManual->setIcon(QIcon(":/img/arrow-left-double.png"));
+        mUpdatesDetailsManual->setIcon(QIcon(":/img/dialog-information_16px.png"));
         mUpdatesDetailsManual->setToolTip(tr("Show details"));
         mUpdatesManualCertificates->show();
     } else {
@@ -941,7 +948,7 @@
                 .arg(mUpdatesNew->certificates().size()) +
                 "</h3>");
         mUpdatesDetailsNew->show();
-        mUpdatesDetailsNew->setIcon(QIcon(":/img/arrow-left-double.png"));
+        mUpdatesDetailsNew->setIcon(QIcon(":/img/dialog-information_16px.png"));
         mUpdatesDetailsNew->setToolTip(tr("Show details"));
         mUpdatesNewCertificates->show();
     } else {
@@ -957,7 +964,7 @@
                 .arg(mUpdatesRemove->certificates().size()) +
                 "</h3>");
         mUpdatesRemoveCertificates->show();
-        mUpdatesDetailsRemove->setIcon(QIcon(":/img/arrow-left-double.png"));
+        mUpdatesDetailsRemove->setIcon(QIcon(":/img/dialog-information_16px.png"));
         mUpdatesDetailsRemove->setToolTip(tr("Show details"));
         mUpdatesDetailsRemove->show();
     } else {
@@ -1234,38 +1241,38 @@
 void MainWindow::toggleUpdatesNew() {
     if (!mUpdatesNew->isVisible()) {
         mUpdatesDetailsNew->setToolTip(tr("Hide details"));
-        mUpdatesDetailsNew->setIcon(QIcon(":/img/arrow-down-double.png"));
+        mUpdatesDetailsNew->setIcon(QIcon(":/img/dialog-information_grey_16px.png"));
         mUpdatesNew->show();
     }
     else {
         mUpdatesNew->hide();
         mUpdatesDetailsNew->setToolTip(tr("Show details"));
-        mUpdatesDetailsNew->setIcon(QIcon(":/img/arrow-left-double.png"));
+        mUpdatesDetailsNew->setIcon(QIcon(":/img/dialog-information_16px.png"));
     }
 }
 
 void MainWindow::toggleUpdatesRemove() {
     if (!mUpdatesRemove->isVisible()) {
         mUpdatesDetailsRemove->setToolTip(tr("Hide details"));
-        mUpdatesDetailsRemove->setIcon(QIcon(":/img/arrow-down-double.png"));
+        mUpdatesDetailsRemove->setIcon(QIcon(":/img/dialog-information_grey_16px.png"));
         mUpdatesRemove->show();
     }
     else {
         mUpdatesRemove->hide();
         mUpdatesDetailsRemove->setToolTip(tr("Show details"));
-        mUpdatesDetailsRemove->setIcon(QIcon(":/img/arrow-left-double.png"));
+        mUpdatesDetailsRemove->setIcon(QIcon(":/img/dialog-information_16px.png"));
     }
 }
 
 void MainWindow::toggleUpdatesManual() {
     if (!mUpdatesManual->isVisible()) {
         mUpdatesDetailsManual->setToolTip(tr("Hide details"));
-        mUpdatesDetailsManual->setIcon(QIcon(":/img/arrow-down-double.png"));
+        mUpdatesDetailsManual->setIcon(QIcon(":/img/dialog-information_grey_16px.png"));
         mUpdatesManual->show();
     }
     else {
         mUpdatesDetailsManual->setToolTip(tr("Show details"));
-        mUpdatesDetailsManual->setIcon(QIcon(":/img/arrow-left-double.png"));
+        mUpdatesDetailsManual->setIcon(QIcon(":/img/dialog-information_16px.png"));
         mUpdatesManual->hide();
     }
 }

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