[PATCH 1 of 5] Use minimum size for certificates to avoid scaling in small lists

Wald Commits scm-commit at wald.intevation.org
Mon Jul 14 18:27:51 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1405345908 -7200
# Node ID 4eff77851e768f1a4705b221798aca48e899fefb
# Parent  2fb539d4b1ff7e1c04dc912260e0f9900d7363f6
Use minimum size for certificates to avoid scaling in small lists.

diff -r 2fb539d4b1ff -r 4eff77851e76 ui/certificateitemwidget.cpp
--- a/ui/certificateitemwidget.cpp	Mon Jul 14 13:21:17 2014 +0200
+++ b/ui/certificateitemwidget.cpp	Mon Jul 14 15:51:48 2014 +0200
@@ -45,6 +45,8 @@
     mComboBox->setIconSize(QSize(48, 48));
     mComboBox->setFixedWidth(68);
 
+    setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
+
     const QString validity = tr("Valid: %1 until %2").arg(
             QLocale::system().toString(mCertificate.validFrom().date(), QLocale::ShortFormat)).arg(
             QLocale::system().toString(mCertificate.validTo().date(), QLocale::ShortFormat));
@@ -54,7 +56,7 @@
         (fpstring));
     mLabel->setTextFormat(Qt::RichText);
 
-    mLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    mLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
 
     mLabel->setTextInteractionFlags(
         Qt::TextSelectableByMouse |


More information about the Trustbridge-commits mailing list