[vlc-devel] commit: Qt: couple of minor corrections (Jakob Leben )

git version control git at videolan.org
Sun Feb 14 09:16:02 CET 2010


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Sun Feb 14 09:10:30 2010 +0100| [5a109618b33b11ae59747c857291cc82672c5b1d] | committer: Jakob Leben 

Qt: couple of minor corrections

- searchLineEdit: proper clearing
- locationBar content will not affect searchLineEdit size

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a109618b33b11ae59747c857291cc82672c5b1d
---

 .../gui/qt4/components/playlist/standardpanel.cpp  |   13 ++++++-------
 modules/gui/qt4/util/customwidgets.cpp             |    2 +-
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 55d5029..4082518 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -76,26 +76,24 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
     lastActivatedId = -1;
 
     locationBar = new LocationBar( model );
-    locationBar->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred );
+    locationBar->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Preferred );
     layout->addWidget( locationBar, 0, 0 );
-    layout->setColumnStretch( 0, 100 );
+    layout->setColumnStretch( 0, 5 );
     CONNECT( locationBar, invoked( const QModelIndex & ),
              this, browseInto( const QModelIndex & ) );
 
-    layout->setColumnStretch( 1, 1 );
-
     searchEdit = new SearchLineEdit( this );
     searchEdit->setMaximumWidth( 250 );
     searchEdit->setMinimumWidth( 80 );
-    layout->addWidget( searchEdit, 0, 3 );
+    layout->addWidget( searchEdit, 0, 2 );
     CONNECT( searchEdit, textChanged( const QString& ),
              this, search( const QString& ) );
-    layout->setColumnStretch( 3, 50 );
+    layout->setColumnStretch( 2, 3 );
 
     /* Button to switch views */
     QToolButton *viewButton = new QToolButton( this );
     viewButton->setIcon( style()->standardIcon( QStyle::SP_FileDialogDetailedView ) );
-    layout->addWidget( viewButton, 0, 2 );
+    layout->addWidget( viewButton, 0, 1 );
 
     /* View selection menu */
     viewSelectionMapper = new QSignalMapper( this );
@@ -468,6 +466,7 @@ void LocationBar::setIndex( const QModelIndex &index )
     buttons.clear();
     QModelIndex i = index;
     bool bold = true;
+    box->addStretch();
     while( true )
     {
         PLItem *item = model->getItem( i );
diff --git a/modules/gui/qt4/util/customwidgets.cpp b/modules/gui/qt4/util/customwidgets.cpp
index 8073bf4..5a509d4 100644
--- a/modules/gui/qt4/util/customwidgets.cpp
+++ b/modules/gui/qt4/util/customwidgets.cpp
@@ -152,7 +152,7 @@ SearchLineEdit::SearchLineEdit( QWidget *parent ) : QLineEdit( parent )
 
 void SearchLineEdit::clear()
 {
-    QLineEdit::clear();
+    setText( QString() );
     clearButton->hide();
     setMessageVisible( true );
 }




More information about the vlc-devel mailing list