Mercurial > trustbridge
diff ui/certificateitemwidget.cpp @ 842:bd33c6585cd0
UI improvements (issue18, 60)
author | Emanuel Schuetze <emanuel@intevation.de> |
---|---|
date | Wed, 30 Jul 2014 09:58:20 +0200 |
parents | b108510bac5a |
children | 9c4543128666 |
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): <%1>").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 {