Commit afa5493c authored by Rafaël Carré's avatar Rafaël Carré

Uses altglass' artwork for repeat/shuffle and add buttons.

parent 75ebd702
...@@ -232,4 +232,10 @@ EXTRA_DIST += \ ...@@ -232,4 +232,10 @@ EXTRA_DIST += \
pixmaps/vlc_file-wide_16px.png \ pixmaps/vlc_file-wide_16px.png \
pixmaps/vlc_info_16px.png \ pixmaps/vlc_info_16px.png \
pixmaps/vlc_previous_16px.png \ pixmaps/vlc_previous_16px.png \
pixmaps/vlc_next_16px.png pixmaps/vlc_next_16px.png \
pixmaps/vlc_playlist_add.png \
pixmaps/vlc_playlist_repeat_off.png \
pixmaps/vlc_playlist_repeat_all.png \
pixmaps/vlc_playlist_repeat_one.png \
pixmaps/vlc_shuffle_on.png \
pixmaps/vlc_shuffle_off.png
...@@ -88,21 +88,25 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -88,21 +88,25 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Buttons configuration */ /* Buttons configuration */
QHBoxLayout *buttons = new QHBoxLayout(); QHBoxLayout *buttons = new QHBoxLayout();
addButton = new QPushButton( "+", this ); addButton = new QPushButton( QIcon( ":/pixmaps/vlc_playlist_add.png" ), "", this );
addButton->setMaximumWidth( 25 ); addButton->setMaximumWidth( 25 );
BUTTONACT( addButton, popupAdd() ); BUTTONACT( addButton, popupAdd() );
buttons->addWidget( addButton ); buttons->addWidget( addButton );
repeatButton = new QPushButton( this ); repeatButton = new QPushButton( this );
if( model->hasRepeat() ) repeatButton->setText( qtr( I_PL_REPEAT ) ); if( model->hasRepeat() ) repeatButton->setIcon(
else if( model->hasLoop() ) repeatButton->setText( qtr( I_PL_LOOP ) ); QIcon( ":/pixmaps/vlc_playlist_repeat_one.png" ) );
else repeatButton->setText( qtr( I_PL_NOREPEAT ) ); else if( model->hasLoop() ) repeatButton->setIcon(
QIcon( ":/pixmaps/vlc_playlist_repeat_all.png" ) );
else repeatButton->setIcon(
QIcon( ":/pixmaps/vlc_playlist_repeat_off.png" ) );
BUTTONACT( repeatButton, toggleRepeat() ); BUTTONACT( repeatButton, toggleRepeat() );
buttons->addWidget( repeatButton ); buttons->addWidget( repeatButton );
randomButton = new QPushButton( this ); randomButton = new QPushButton( this );
randomButton->setText( model->hasRandom() ? qtr( I_PL_RANDOM ) randomButton->setIcon( model->hasRandom() ?
: qtr( I_PL_NORANDOM) ); QIcon( ":/pixmaps/vlc_playlist_shuffle_on.png" ) :
QIcon( ":/pixmaps/vlc_playlist_shuffle_off.png" ) );
BUTTONACT( randomButton, toggleRandom() ); BUTTONACT( randomButton, toggleRandom() );
buttons->addWidget( randomButton ); buttons->addWidget( randomButton );
...@@ -131,17 +135,17 @@ void StandardPLPanel::toggleRepeat() ...@@ -131,17 +135,17 @@ void StandardPLPanel::toggleRepeat()
if( model->hasRepeat() ) if( model->hasRepeat() )
{ {
model->setRepeat( false ); model->setLoop( true ); model->setRepeat( false ); model->setLoop( true );
repeatButton->setText( qtr(I_PL_LOOP) ); repeatButton->setIcon( QIcon( ":/pixmaps/vlc_playlist_repeat_all.png" ) );
} }
else if( model->hasLoop() ) else if( model->hasLoop() )
{ {
model->setRepeat( false ) ; model->setLoop( false ); model->setRepeat( false ) ; model->setLoop( false );
repeatButton->setText( qtr(I_PL_NOREPEAT) ); repeatButton->setIcon( QIcon( ":/pixmaps/vlc_playlist_repeat_off.png" ) );
} }
else else
{ {
model->setRepeat( true ); model->setRepeat( true );
repeatButton->setText( qtr(I_PL_REPEAT) ); repeatButton->setIcon( QIcon( ":/pixmaps/vlc_playlist_repeat_one.png" ) );
} }
} }
...@@ -149,7 +153,9 @@ void StandardPLPanel::toggleRandom() ...@@ -149,7 +153,9 @@ void StandardPLPanel::toggleRandom()
{ {
bool prev = model->hasRandom(); bool prev = model->hasRandom();
model->setRandom( !prev ); model->setRandom( !prev );
randomButton->setText( prev ? qtr(I_PL_NORANDOM) : qtr(I_PL_RANDOM) ); randomButton->setIcon( prev ?
QIcon( ":/pixmaps/vlc_playlist_shuffle_off.png" ) :
QIcon( ":/pixmaps/vlc_playlist_shuffle_on.png" ) );
} }
void StandardPLPanel::handleExpansion( const QModelIndex &index ) void StandardPLPanel::handleExpansion( const QModelIndex &index )
......
...@@ -40,5 +40,11 @@ ...@@ -40,5 +40,11 @@
<file>pixmaps/vlc_playlist_16px.png</file> <file>pixmaps/vlc_playlist_16px.png</file>
<file>pixmaps/vlc_settings_16px.png</file> <file>pixmaps/vlc_settings_16px.png</file>
<file>pixmaps/vlc_stream_16px.png</file> <file>pixmaps/vlc_stream_16px.png</file>
<file>pixmaps/vlc_playlist_add.png</file>
<file>pixmaps/vlc_playlist_repeat_all.png</file>
<file>pixmaps/vlc_playlist_repeat_one.png</file>
<file>pixmaps/vlc_playlist_repeat_off.png</file>
<file>pixmaps/vlc_playlist_shuffle_off.png</file>
<file>pixmaps/vlc_playlist_shuffle_on.png</file>
</qresource> </qresource>
</RCC> </RCC>
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