[PATCH] UI improvements (issue18, 60)
Wald Commits
scm-commit at wald.intevation.org
Wed Jul 30 09:59:37 CEST 2014
# HG changeset patch
# User Emanuel Schuetze <emanuel at intevation.de>
# Date 1406707100 -7200
# Node ID bd33c6585cd0ef61f8265b4e3242a1dd7bd8e7f6
# Parent 216a65d7fc4b8c44bf78cd208234998a16a7cd4f
UI improvements (issue18, 60)
diff -r 216a65d7fc4b -r bd33c6585cd0 ui/certificateitemwidget.cpp
--- 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 {
diff -r 216a65d7fc4b -r bd33c6585cd0 ui/certificatelistwidget.cpp
--- 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(
diff -r 216a65d7fc4b -r bd33c6585cd0 ui/mainwindow.cpp
--- 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()));
More information about the Trustbridge-commits
mailing list