]> git.sesse.net Git - vlc/commitdiff
Qt: use a QStackedWidget for the artContainer in the playlist
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 14 Oct 2011 00:47:16 +0000 (02:47 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 14 Oct 2011 11:05:11 +0000 (13:05 +0200)
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.hpp

index 296d117d1131341c7db2af300def2e109ae7f168..2337ed91337fa71ca5ea27d541225a8f8703dc61 100644 (file)
@@ -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& ) );
index c94a84fd51d56e71167c1c08e95c2c70afac0fd2..ae38a279a87a68966c0de59a9d4a1c88e7cbcf8f 100644 (file)
@@ -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;