Commit be5d2470 authored by Jean-Philippe André's avatar Jean-Philippe André

Qt: fix layout of extension info panel

parent 6e6ee4ea
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
#include <QLabel> #include <QLabel>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QComboBox> #include <QComboBox>
#include <QTextBrowser>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QSpacerItem> #include <QSpacerItem>
...@@ -484,27 +483,27 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension, ...@@ -484,27 +483,27 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension,
// Version // Version
label = new QLabel( "<b>" + qtr( "Version" ) + ":</b>", this ); label = new QLabel( "<b>" + qtr( "Version" ) + ":</b>", this );
layout->addWidget( label, 1, 1, 1, 1 ); layout->addWidget( label, 1, 1, 1, 1, Qt::AlignBottom );
label = new QLabel( extension.version, this ); label = new QLabel( extension.version, this );
layout->addWidget( label, 1, 2, 1, 1 ); layout->addWidget( label, 1, 2, 1, 2, Qt::AlignBottom );
// Author // Author
label = new QLabel( "<b>" + qtr( "Author" ) + ":</b>", this ); label = new QLabel( "<b>" + qtr( "Author" ) + ":</b>", this );
layout->addWidget( label, 2, 1, 1, 1 ); layout->addWidget( label, 2, 1, 1, 1, Qt::AlignTop );
label = new QLabel( extension.author, this ); label = new QLabel( extension.author, this );
layout->addWidget( label, 2, 2, 1, 1 ); layout->addWidget( label, 2, 2, 1, 2, Qt::AlignTop );
// Description // Description
// FIXME: if( !extension.full_description.isEmpty() ) ... label = new QLabel( this );
QTextBrowser *text = new QTextBrowser( this ); label->setText( extension.description );
text->setHtml( extension.description ); label->setWordWrap( true );
text->setOpenExternalLinks( true ); label->setOpenExternalLinks( true );
layout->addWidget( text, 4, 0, 1, -1 ); layout->addWidget( label, 4, 0, 1, -1 );
// URL // URL
label = new QLabel( "<b>" + qtr( "Website" ) + ":</b>", this ); label = new QLabel( "<b>" + qtr( "Website" ) + ":</b>", this );
layout->addWidget( label, 5, 0, 1, 1 ); layout->addWidget( label, 5, 0, 1, 2 );
QString txt = "<a href=\""; QString txt = "<a href=\"";
txt += extension.url; txt += extension.url;
txt += "\">"; txt += "\">";
...@@ -513,13 +512,13 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension, ...@@ -513,13 +512,13 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension,
label = new QLabel( txt, this ); label = new QLabel( txt, this );
label->setText( txt ); label->setText( txt );
label->setOpenExternalLinks( true ); label->setOpenExternalLinks( true );
layout->addWidget( label, 5, 1, 1, -1 ); layout->addWidget( label, 5, 2, 1, -1 );
// Script file // Script file
label = new QLabel( "<b>" + qtr( "File" ) + ":</b>", this ); label = new QLabel( "<b>" + qtr( "File" ) + ":</b>", this );
layout->addWidget( label, 6, 0, 1, 1 ); layout->addWidget( label, 6, 0, 1, 2 );
QLineEdit *line = new QLineEdit( extension.name, this ); QLineEdit *line = new QLineEdit( extension.name, this );
layout->addWidget( line, 6, 1, 1, -1 ); layout->addWidget( line, 6, 2, 1, -1 );
// Close button // Close button
QDialogButtonBox *group = new QDialogButtonBox( QDialogButtonBox::Close, QDialogButtonBox *group = new QDialogButtonBox( QDialogButtonBox::Close,
...@@ -529,6 +528,8 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension, ...@@ -529,6 +528,8 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension,
// Fix layout // Fix layout
layout->setColumnStretch( 2, 1 ); layout->setColumnStretch( 2, 1 );
layout->setRowStretch( 4, 1 );
setMinimumSize( 450, 350 );
} }
ExtensionInfoDialog::~ExtensionInfoDialog() ExtensionInfoDialog::~ExtensionInfoDialog()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment