changeset 842:bd33c6585cd0

UI improvements (issue18, 60)
author Emanuel Schuetze <emanuel@intevation.de>
date Wed, 30 Jul 2014 09:58:20 +0200
parents 216a65d7fc4b
children c27a9b2b096e
files ui/certificateitemwidget.cpp ui/certificatelistwidget.cpp ui/mainwindow.cpp
diffstat 3 files changed, 19 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ui/certificateitemwidget.cpp	Tue Jul 29 18:12:57 2014 +0200
+++ b/ui/certificateitemwidget.cpp	Wed Jul 30 09:58:20 2014 +0200
@@ -42,21 +42,21 @@
         mComboBox->setStyle(fusionStyle);
     }
 
-    mComboBox->setIconSize(QSize(48, 48));
-    mComboBox->setFixedWidth(68);
+    mComboBox->setIconSize(QSize(32, 32));
+    mComboBox->setFixedWidth(64);
 
     setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
 
-    const QString validity = tr("Valid: %1 until %2").arg(
+    const QString validity = tr("Validity: %1 until %2").arg(
             QLocale::system().toString(mCertificate.validFrom().date(), QLocale::ShortFormat)).arg(
             QLocale::system().toString(mCertificate.validTo().date(), QLocale::ShortFormat));
-    const QString fpstring = tr("Fingerprint (SHA1): &lt;%1&gt;").arg(mCertificate.fingerprint());
-    mLabel->setText(QString::fromLatin1("<big><b>%1</b><br/>%2<br/>%3<br/>%4</big>").arg
+    const QString fpstring = tr("Fingerprint (SHA1): <code>%1</code>").arg(mCertificate.fingerprint());
+    mLabel->setText(QString::fromLatin1("<big><b>%1</b></big><br/>%2<br/>%3<br/>%4").arg
         (mCertificate.subjectCN()).arg(mCertificate.subjectO()).arg(validity).arg
         (fpstring));
     mLabel->setTextFormat(Qt::RichText);
 
-    mLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
+    mLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
 
     mLabel->setTextInteractionFlags(
         Qt::TextSelectableByMouse |
@@ -69,10 +69,13 @@
     if (mCertificate.isInstallCert()) {
         mComboBox->addItem(QIcon(":/img/security-high.png"), QString(), mInstallLabel);
         mComboBox->addItem(QIcon(":/img/security-low.png"), QString(), mRemoveLabel);
-        if (mState)
+        if (mState) {
             mComboBox->setCurrentIndex(0);
+            mComboBox->setToolTip(tr("This certificate is currently installed."));
+	}
         else {
             mComboBox->setCurrentIndex(1);
+            mComboBox->setToolTip(tr("This certificate is currently not installed."));
         }
         layout->addWidget(mComboBox);
     }
@@ -80,13 +83,15 @@
         QImage *img = new QImage(":/img/trash-empty.png");
         QLabel *imgLabel = new QLabel;
         imgLabel->setPixmap(QPixmap::fromImage(*img));
-        imgLabel->setFixedSize(48, 48);
-        imgLabel->setMargin(2);
+        imgLabel->setFixedSize(64, 64);
+        imgLabel->setMargin(8);
+        imgLabel->setToolTip(tr("This certificate was uninstalled."));
         layout->addWidget(imgLabel);
     }
     else {
         mComboBox->addItem(QIcon(":/img/trash-empty.png"), QString(), tr("uninstall"));
         mComboBox->addItem(QIcon(":/img/security-medium.png"), QString(), tr("keep"));
+        mComboBox->setToolTip(tr("This certificate is currently installed."));
         if (mState)
             mComboBox->setCurrentIndex(0);
         else {
--- a/ui/certificatelistwidget.cpp	Tue Jul 29 18:12:57 2014 +0200
+++ b/ui/certificatelistwidget.cpp	Wed Jul 30 09:58:20 2014 +0200
@@ -17,7 +17,9 @@
 CertificateListWidget::CertificateListWidget(QWidget *parent, Qt::WindowFlags flags) :
     QWidget(parent, flags)
 {
-    setLayout(&mLayout);
+    QVBoxLayout *outerLayout =  new QVBoxLayout(this);
+    outerLayout->addLayout(&mLayout);
+    outerLayout->addStretch();
 }
 
 void CertificateListWidget::addCertificate(
--- a/ui/mainwindow.cpp	Tue Jul 29 18:12:57 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Jul 30 09:58:20 2014 +0200
@@ -532,8 +532,8 @@
         mLastUpdateCheck = new QLabel(tr("Last successful update check:"));
         mLastUpdateCheckContents = new QLabel(tr("No connection with the updateserver."));
     }
-    QPushButton *searchUpdates = new QPushButton();
-    searchUpdates->setStyleSheet("QPushButton {border-style: outset; border-width: 0px;}");
+    QPushButton *searchUpdates = new QPushButton(" " + tr("Update"));
+    searchUpdates->setFixedHeight(22);
     searchUpdates->setToolTip(tr("Check for Updates"));
     searchUpdates->setIcon(QIcon(":/img/update-list.png"));
     connect(searchUpdates, SIGNAL(clicked()), this, SLOT(checkUpdates()));

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