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

Qt4 - Add a "medium" volume icon as requested on IRC, ( by Quovodis?)

parent ca64fcfe
...@@ -224,6 +224,7 @@ EXTRA_DIST += \ ...@@ -224,6 +224,7 @@ EXTRA_DIST += \
pixmaps/type_playlist.png \ pixmaps/type_playlist.png \
pixmaps/type_unknown.xpm \ pixmaps/type_unknown.xpm \
pixmaps/volume-high.png \ pixmaps/volume-high.png \
pixmaps/volume-medium.png \
pixmaps/volume-low.png \ pixmaps/volume-low.png \
pixmaps/volume-muted.png \ pixmaps/volume-muted.png \
pixmaps/volume-slider.svg \ pixmaps/volume-slider.svg \
......
...@@ -596,7 +596,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -596,7 +596,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
VolumeClickHandler *hVolLabel = new VolumeClickHandler( p_intf, this ); VolumeClickHandler *hVolLabel = new VolumeClickHandler( p_intf, this );
volMuteLabel = new QLabel; volMuteLabel = new QLabel;
volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-high.png" ) ); volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-medium.png" ) );
volMuteLabel->setToolTip( qtr( "Mute" ) ); volMuteLabel->setToolTip( qtr( "Mute" ) );
volMuteLabel->installEventFilter( hVolLabel ); volMuteLabel->installEventFilter( hVolLabel );
controlLayout->addWidget( volMuteLabel, 3, 15, Qt::AlignBottom ); controlLayout->addWidget( volMuteLabel, 3, 15, Qt::AlignBottom );
...@@ -690,9 +690,11 @@ void ControlsWidget::updateVolume( int i_sliderVolume ) ...@@ -690,9 +690,11 @@ void ControlsWidget::updateVolume( int i_sliderVolume )
} }
if( i_sliderVolume == 0 ) if( i_sliderVolume == 0 )
volMuteLabel->setPixmap( QPixmap(":/pixmaps/volume-muted.png" ) ); volMuteLabel->setPixmap( QPixmap(":/pixmaps/volume-muted.png" ) );
else if( i_sliderVolume < VOLUME_MAX / 2 ) else if( i_sliderVolume < VOLUME_MAX / 3 )
volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-low.png" ) ); volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-low.png" ) );
else volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-high.png" ) ); else if( i_sliderVolume > (VOLUME_MAX * 2 / 3 ) )
volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-high.png" ) );
else volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-medium.png" ) );
} }
void ControlsWidget::updateOnTimer() void ControlsWidget::updateOnTimer()
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<file>pixmaps/type_node.png</file> <file>pixmaps/type_node.png</file>
<file>pixmaps/type_playlist.png</file> <file>pixmaps/type_playlist.png</file>
<file>pixmaps/volume-high.png</file> <file>pixmaps/volume-high.png</file>
<file>pixmaps/volume-medium.png</file>
<file>pixmaps/volume-low.png</file> <file>pixmaps/volume-low.png</file>
<file>pixmaps/volume-muted.png</file> <file>pixmaps/volume-muted.png</file>
<file>pixmaps/volume-slider-inside.png</file> <file>pixmaps/volume-slider-inside.png</file>
......
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