[vlc-commits] Qt: use a QStackedWidget for the artContainer in the playlist

Jean-Baptiste Kempf git at videolan.org
Fri Oct 14 13:05:27 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Oct 14 02:47:16 2011 +0200| [fc583e2c34cee848250fa06572b037bb54ed915f] | committer: Jean-Baptiste Kempf

Qt: use a QStackedWidget for the artContainer in the playlist

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

 modules/gui/qt4/components/playlist/playlist.cpp |    8 +++-----
 modules/gui/qt4/components/playlist/playlist.hpp |    3 ++-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp
index 296d117..2337ed9 100644
--- a/modules/gui/qt4/components/playlist/playlist.cpp
+++ b/modules/gui/qt4/components/playlist/playlist.cpp
@@ -41,6 +41,7 @@
 #include <QMenu>
 #include <QSignalMapper>
 #include <QSlider>
+#include <QStackedWidget>
 
 /**********************************************************************
  * Playlist Widget. The embedded playlist
@@ -67,16 +68,13 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
 
     /* Create a Container for the Art Label
        in order to have a beautiful resizing for the selector above it */
-    QWidget *artContainer = new QWidget;
-    QHBoxLayout *artContLay = new QHBoxLayout( artContainer );
-    artContLay->setMargin( 0 );
-    artContLay->setSpacing( 0 );
+    artContainer = new QStackedWidget;
     artContainer->setMaximumHeight( 128 );
 
     /* Art label */
     CoverArtLabel *art = new CoverArtLabel( artContainer, p_intf );
     art->setToolTip( qtr( "Double click to get media information" ) );
-    artContLay->addWidget( art, 1 );
+    artContainer->addWidget( art );
 
     CONNECT( THEMIM->getIM(), artChanged( QString ),
              art, showArtUpdate( const QString& ) );
diff --git a/modules/gui/qt4/components/playlist/playlist.hpp b/modules/gui/qt4/components/playlist/playlist.hpp
index c94a84f..ae38a27 100644
--- a/modules/gui/qt4/components/playlist/playlist.hpp
+++ b/modules/gui/qt4/components/playlist/playlist.hpp
@@ -45,6 +45,7 @@ class LocationBar;
 class QSignalMapper;
 class SearchLineEdit;
 class QModelIndex;
+class QStackedWidget;
 
 class PlaylistWidget : public QWidget
 {
@@ -55,7 +56,7 @@ public:
 
     void forceHide();
     void forceShow();
-
+    QStackedWidget *artContainer;
 private:
     QSplitter            *leftSplitter;
     QSplitter            *split;



More information about the vlc-commits mailing list