From 8a912e6ca1ead0b47c70ed3d9a34356151a05aaa Mon Sep 17 00:00:00 2001
From: Adriaan de Groot <groot@kde.org>
Date: Mon, 9 Dec 2019 17:08:35 +0100
Subject: [PATCH] [license] Fix the height of each item

 - needs a qwidget to put the top-items (license name, button) in
 - fixes issue where the gap between the button and the hrule would
   change depending on what is expanded
---
 src/modules/license/LicenseWidget.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/modules/license/LicenseWidget.cpp b/src/modules/license/LicenseWidget.cpp
index 0d6ef76d6..4fb338d46 100644
--- a/src/modules/license/LicenseWidget.cpp
+++ b/src/modules/license/LicenseWidget.cpp
@@ -66,18 +66,21 @@ LicenseWidget::LicenseWidget( LicenseEntry entry, QWidget* parent )
     setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
     setContentsMargins( 4, 4, 4, 4 );
 
+    QVBoxLayout* vLayout = new QVBoxLayout;
+    QWidget* topPart = new QWidget( this );
+    vLayout->addWidget( topPart );
+
     QHBoxLayout* wiLayout = new QHBoxLayout;
+    topPart->setLayout( wiLayout );
 
     m_label->setWordWrap( true );
     m_label->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
     wiLayout->addWidget( m_label );
 
-    wiLayout->addSpacing( 1 );
-    m_viewLicenseButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+    wiLayout->addSpacing( 10 );
+    m_viewLicenseButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
     wiLayout->addWidget( m_viewLicenseButton );
 
-    QVBoxLayout* vLayout = new QVBoxLayout;
-    vLayout->addLayout( wiLayout );
     m_licenceTextLabel->setStyleSheet( "border-top: 1px solid black; margin-top: 0px; padding-top: 1em;" );
     m_licenceTextLabel->setObjectName( "licenseItemFullText" );