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

Qt4 - Art in the playlist is collapsable with the use of a QSplitter. If you...

Qt4 - Art in the playlist is collapsable with the use of a QSplitter. If you really don't like, please revert.

parent a726c1c1
...@@ -42,12 +42,11 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings ) : ...@@ -42,12 +42,11 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings ) :
p_intf ( _p_i ) p_intf ( _p_i )
{ {
/* Left Part and design */ /* Left Part and design */
QWidget *leftW = new QWidget( this ); QSplitter *leftW = new QSplitter( Qt::Vertical, this );
QVBoxLayout *left = new QVBoxLayout( leftW );
/* Source Selector */ /* Source Selector */
selector = new PLSelector( this, p_intf, THEPL ); selector = new PLSelector( this, p_intf, THEPL );
left->addWidget( selector ); leftW->addWidget( selector );
/* Art label */ /* Art label */
art = new QLabel( "" ); art = new QLabel( "" );
...@@ -57,7 +56,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings ) : ...@@ -57,7 +56,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings ) :
art->setMaximumWidth( 128 ); art->setMaximumWidth( 128 );
art->setScaledContents( true ); art->setScaledContents( true );
art->setPixmap( QPixmap( ":/noart.png" ) ); art->setPixmap( QPixmap( ":/noart.png" ) );
left->addWidget( art ); leftW->addWidget( art );
/* Initialisation of the playlist */ /* Initialisation of the playlist */
playlist_item_t *p_root = playlist_GetPreferredNode( THEPL, playlist_item_t *p_root = playlist_GetPreferredNode( THEPL,
...@@ -84,15 +83,14 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings ) : ...@@ -84,15 +83,14 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QSettings *settings ) :
addWidget( leftW ); addWidget( leftW );
addWidget( rightPanel ); addWidget( rightPanel );
leftW->setMaximumWidth( 250 );
setCollapsible( 1, false );
QList<int> sizeList; QList<int> sizeList;
sizeList << 180 << 420 ; sizeList << 180 << 420 ;
setSizes( sizeList ); setSizes( sizeList );
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding ); setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
setStretchFactor( 0, 0 ); setStretchFactor( 0, 0 );
setStretchFactor( 1, 3 ); setStretchFactor( 1, 3 );
leftW->setMaximumWidth( 250 );
setCollapsible( 1, false );
/* In case we want to keep the splitter informations */ /* In case we want to keep the splitter informations */
settings->beginGroup( "playlist" ); settings->beginGroup( "playlist" );
......
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