videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp
branchRCL_3
changeset 23 8f0df5c82986
parent 21 55fa1ec415c6
child 45 baf439b22ddd
equal deleted inserted replaced
21:55fa1ec415c6 23:8f0df5c82986
    13 *
    13 *
    14 * Description: Progress bar control
    14 * Description: Progress bar control
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 22 %
    18 
       
    19 // Version : %version: 23 %
    19 
    20 
    20 
    21 
    21 // INCLUDE FILES
    22 // INCLUDE FILES
    22 #include <eikenv.h>
    23 #include <eikenv.h>
    23 #include <gulicon.h>
    24 #include <gulicon.h>
   482     MPX_DEBUG(_L("CMPXVideoPlaybackProgressBar::Draw()"));
   483     MPX_DEBUG(_L("CMPXVideoPlaybackProgressBar::Draw()"));
   483 
   484 
   484     CWindowGc& gc = SystemGc();
   485     CWindowGc& gc = SystemGc();
   485     gc.SetClippingRect( aRect );
   486     gc.SetClippingRect( aRect );
   486 
   487 
   487     if ( iController->SetBackgroundBlack() )
   488     if ( Window().DisplayMode() == EColor16MAP )
   488     {
   489     {
   489         if ( Window().DisplayMode() == EColor16MAP )
   490         gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   490         {
   491         gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
   491             gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   492         gc.Clear( aRect );
   492             gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
   493     }
   493             gc.Clear( aRect );
   494     else if ( Window().DisplayMode() == EColor16MA )
   494         }
   495     {
   495         else if ( Window().DisplayMode() == EColor16MA )
   496         gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   496         {
   497         gc.SetBrushColor( TRgb::Color16MA( 0 ) );
   497             gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
   498         gc.Clear( aRect );
   498             gc.SetBrushColor( TRgb::Color16MA( 0 ) );
       
   499             gc.Clear( aRect );
       
   500         }
       
   501     }
       
   502     else
       
   503     {
       
   504         //
       
   505         //  draw a solid background so that the entire progress
       
   506         //  bar is shown not just the area representing the
       
   507         //  portion that has been played.
       
   508         //
       
   509         gc.SetBrushColor( KRgbBlack );
       
   510         gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
       
   511         gc.DrawRect( aRect );
       
   512         gc.SetBrushStyle(CGraphicsContext::ENullBrush);
       
   513     }
   499     }
   514 
   500 
   515     //
   501     //
   516     // If it is live streaming, don't need to draw the progress bar
   502     // If it is live streaming, don't need to draw the progress bar
   517     //
   503     //