Commit fc583e2c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: use a QStackedWidget for the artContainer in the playlist

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