]> git.sesse.net Git - vlc/commitdiff
Qt4 - Add a "medium" volume icon as requested on IRC, ( by Quovodis?)
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 22 Dec 2007 19:21:17 +0000 (19:21 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 22 Dec 2007 19:21:17 +0000 (19:21 +0000)
modules/gui/qt4/Modules.am
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/pixmaps/volume-medium.png [new file with mode: 0644]
modules/gui/qt4/res.qrc

index 69b4b6b3df5a7ecebd4955cf7898755f5f489a38..cf73db2c3dc83bced068b3ce4d05476ef5a1f065 100644 (file)
@@ -224,6 +224,7 @@ EXTRA_DIST += \
        pixmaps/type_playlist.png \
        pixmaps/type_unknown.xpm \
        pixmaps/volume-high.png \
+       pixmaps/volume-medium.png \
        pixmaps/volume-low.png \
        pixmaps/volume-muted.png \
        pixmaps/volume-slider.svg \
index f5bc04296ed14be23e9cb6e3a3866b9281889b30..cd5ffc6bd9c2444270b1b6f2960e52b0bd942336 100644 (file)
@@ -596,7 +596,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
     VolumeClickHandler *hVolLabel = new VolumeClickHandler( p_intf, this );
 
     volMuteLabel = new QLabel;
-    volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-high.png" ) );
+    volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-medium.png" ) );
     volMuteLabel->setToolTip( qtr( "Mute" ) );
     volMuteLabel->installEventFilter( hVolLabel );
     controlLayout->addWidget( volMuteLabel, 3, 15, Qt::AlignBottom );
@@ -690,9 +690,11 @@ void ControlsWidget::updateVolume( int i_sliderVolume )
     }
     if( i_sliderVolume == 0 )
         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" ) );
-    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()
diff --git a/modules/gui/qt4/pixmaps/volume-medium.png b/modules/gui/qt4/pixmaps/volume-medium.png
new file mode 100644 (file)
index 0000000..3d042f5
Binary files /dev/null and b/modules/gui/qt4/pixmaps/volume-medium.png differ
index 4c16f9ca446b4fbb9992b64b9d33c966167ed2e0..1857650e2265aa9a14f765f47b01bd750038e4a8 100644 (file)
@@ -60,6 +60,7 @@
   <file>pixmaps/type_node.png</file>
   <file>pixmaps/type_playlist.png</file>
   <file>pixmaps/volume-high.png</file>
+  <file>pixmaps/volume-medium.png</file>
   <file>pixmaps/volume-low.png</file>
   <file>pixmaps/volume-muted.png</file>
   <file>pixmaps/volume-slider-inside.png</file>