videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp
branchRCL_3
changeset 15 8f0df5c82986
parent 14 55fa1ec415c6
child 18 baf439b22ddd
equal deleted inserted replaced
14:55fa1ec415c6 15:8f0df5c82986
    14 * Description: Volume bar control
    14 * Description: Volume bar control
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // Version : %version: 22 %
    19 // Version : %version: 23 %
    20 
    20 
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include <eikenv.h>
    23 #include <eikenv.h>
    24 #include <gulicon.h>
    24 #include <gulicon.h>
   824     MPX_DEBUG(_L("CMPXVideoPlaybackVolumeBar::Draw()"));
   824     MPX_DEBUG(_L("CMPXVideoPlaybackVolumeBar::Draw()"));
   825 
   825 
   826     CWindowGc& gc = SystemGc();
   826     CWindowGc& gc = SystemGc();
   827     gc.SetClippingRect( aRect );
   827     gc.SetClippingRect( aRect );
   828 
   828 
   829     if ( iController->SetBackgroundBlack() )
   829     if ( Window().DisplayMode() == EColor16MAP )
   830     {
   830     {
   831         if ( Window().DisplayMode() == EColor16MAP )
   831         gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   832         {
   832         gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
   833             gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   833         gc.Clear( aRect );
   834             gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
   834     }
   835             gc.Clear( aRect );
   835     else if ( Window().DisplayMode() == EColor16MA )
   836         }
   836     {
   837         else if ( Window().DisplayMode() == EColor16MA )
   837         gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   838         {
   838         gc.SetBrushColor( TRgb::Color16MA( 0 ) );
   839             gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   839         gc.Clear( aRect );
   840             gc.SetBrushColor( TRgb::Color16MA( 0 ) );
       
   841             gc.Clear( aRect );
       
   842         }
       
   843     }
       
   844     else
       
   845     {
       
   846         // draw a solid background so that the entire progress
       
   847         // bar is shown not just the area representing the
       
   848         // portion that has been played.
       
   849         gc.SetBrushColor( KRgbBlack );
       
   850         gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
       
   851         gc.DrawRect( aRect );
       
   852         gc.SetBrushStyle(CGraphicsContext::ENullBrush);
       
   853     }
   840     }
   854 
   841 
   855     if ( ! iController->FileDetails()->iAudioEnabled || iMuted )
   842     if ( ! iController->FileDetails()->iAudioEnabled || iMuted )
   856     {
   843     {
   857         if ( iController->FileDetails()->iAudioEnabled )
   844         if ( iController->FileDetails()->iAudioEnabled )