[vlc-devel] commit: Qt: fix layout of extension info panel ( Jean-Philippe André )
git version control
git at videolan.org
Wed Feb 3 17:21:56 CET 2010
vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Wed Feb 3 17:08:59 2010 +0100| [be5d247044d12f68677b3300693e8541c33f522a] | committer: Jean-Philippe André
Qt: fix layout of extension info panel
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=be5d247044d12f68677b3300693e8541c33f522a
---
modules/gui/qt4/dialogs/plugins.cpp | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/modules/gui/qt4/dialogs/plugins.cpp b/modules/gui/qt4/dialogs/plugins.cpp
index 891af01..66ddd20 100644
--- a/modules/gui/qt4/dialogs/plugins.cpp
+++ b/modules/gui/qt4/dialogs/plugins.cpp
@@ -44,7 +44,6 @@
#include <QLabel>
#include <QVBoxLayout>
#include <QComboBox>
-#include <QTextBrowser>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QSpacerItem>
@@ -484,27 +483,27 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension,
// Version
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 );
- layout->addWidget( label, 1, 2, 1, 1 );
+ layout->addWidget( label, 1, 2, 1, 2, Qt::AlignBottom );
// Author
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 );
- layout->addWidget( label, 2, 2, 1, 1 );
+ layout->addWidget( label, 2, 2, 1, 2, Qt::AlignTop );
// Description
- // FIXME: if( !extension.full_description.isEmpty() ) ...
- QTextBrowser *text = new QTextBrowser( this );
- text->setHtml( extension.description );
- text->setOpenExternalLinks( true );
- layout->addWidget( text, 4, 0, 1, -1 );
+ label = new QLabel( this );
+ label->setText( extension.description );
+ label->setWordWrap( true );
+ label->setOpenExternalLinks( true );
+ layout->addWidget( label, 4, 0, 1, -1 );
// URL
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=\"";
txt += extension.url;
txt += "\">";
@@ -513,13 +512,13 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension,
label = new QLabel( txt, this );
label->setText( txt );
label->setOpenExternalLinks( true );
- layout->addWidget( label, 5, 1, 1, -1 );
+ layout->addWidget( label, 5, 2, 1, -1 );
// Script file
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 );
- layout->addWidget( line, 6, 1, 1, -1 );
+ layout->addWidget( line, 6, 2, 1, -1 );
// Close button
QDialogButtonBox *group = new QDialogButtonBox( QDialogButtonBox::Close,
@@ -529,6 +528,8 @@ ExtensionInfoDialog::ExtensionInfoDialog( const ExtensionCopy& extension,
// Fix layout
layout->setColumnStretch( 2, 1 );
+ layout->setRowStretch( 4, 1 );
+ setMinimumSize( 450, 350 );
}
ExtensionInfoDialog::~ExtensionInfoDialog()
More information about the vlc-devel
mailing list