comparison ui/certificateitemwidget.cpp @ 786:4eff77851e76

Use minimum size for certificates to avoid scaling in small lists.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 14 Jul 2014 15:51:48 +0200
parents 9f13c00a2647
children b108510bac5a
comparison
equal deleted inserted replaced
785:2fb539d4b1ff 786:4eff77851e76
43 } 43 }
44 44
45 mComboBox->setIconSize(QSize(48, 48)); 45 mComboBox->setIconSize(QSize(48, 48));
46 mComboBox->setFixedWidth(68); 46 mComboBox->setFixedWidth(68);
47 47
48 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
49
48 const QString validity = tr("Valid: %1 until %2").arg( 50 const QString validity = tr("Valid: %1 until %2").arg(
49 QLocale::system().toString(mCertificate.validFrom().date(), QLocale::ShortFormat)).arg( 51 QLocale::system().toString(mCertificate.validFrom().date(), QLocale::ShortFormat)).arg(
50 QLocale::system().toString(mCertificate.validTo().date(), QLocale::ShortFormat)); 52 QLocale::system().toString(mCertificate.validTo().date(), QLocale::ShortFormat));
51 const QString fpstring = tr("Fingerprint (SHA1): &lt;%1&gt;").arg(mCertificate.fingerprint()); 53 const QString fpstring = tr("Fingerprint (SHA1): &lt;%1&gt;").arg(mCertificate.fingerprint());
52 mLabel->setText(QString::fromLatin1("<big><b>%1</b><br/>%2<br/>%3<br/>%4</big>").arg 54 mLabel->setText(QString::fromLatin1("<big><b>%1</b><br/>%2<br/>%3<br/>%4</big>").arg
53 (mCertificate.subjectCN()).arg(mCertificate.subjectO()).arg(validity).arg 55 (mCertificate.subjectCN()).arg(mCertificate.subjectO()).arg(validity).arg
54 (fpstring)); 56 (fpstring));
55 mLabel->setTextFormat(Qt::RichText); 57 mLabel->setTextFormat(Qt::RichText);
56 58
57 mLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 59 mLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
58 60
59 mLabel->setTextInteractionFlags( 61 mLabel->setTextInteractionFlags(
60 Qt::TextSelectableByMouse | 62 Qt::TextSelectableByMouse |
61 Qt::TextSelectableByKeyboard); 63 Qt::TextSelectableByKeyboard);
62 mComboBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); 64 mComboBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);

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