videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp
branchRCL_3
changeset 13 112a725ff2c2
parent 11 5294c000a26d
child 14 8970fbd719ec
equal deleted inserted replaced
11:5294c000a26d 13:112a725ff2c2
    14 * Description:  Implementation of MPXVideoPlaybackControlsController
    14 * Description:  Implementation of MPXVideoPlaybackControlsController
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // Version : %version: e003sa33#30 %
    19 // Version : %version: e003sa33#31 %
    20 
    20 
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include <fbs.h>
    23 #include <fbs.h>
    24 #include <coecntrl.h>
    24 #include <coecntrl.h>
   625 
   625 
   626             TAknLayoutRect buttonBarRect;
   626             TAknLayoutRect buttonBarRect;
   627             buttonBarRect.LayoutRect( buttonBarPaneRect.Rect(),
   627             buttonBarRect.LayoutRect( buttonBarPaneRect.Rect(),
   628                                       grid_sctrl_middle_pane( 0 ).LayoutLine() );
   628                                       grid_sctrl_middle_pane( 0 ).LayoutLine() );
   629 
   629 
       
   630             TRect btBarRect( buttonBarRect.Rect() );
       
   631             btBarRect.iBr.iY -= 25;
       
   632             btBarRect.iTl.iY += 15;
   630             CMPXVideoPlaybackButtonBar* buttonBar =
   633             CMPXVideoPlaybackButtonBar* buttonBar =
   631                 CMPXVideoPlaybackButtonBar::NewL( this, buttonBarRect.Rect() );
   634                 CMPXVideoPlaybackButtonBar::NewL( this, btBarRect );
   632 
   635 
   633             CleanupStack::PushL( buttonBar );
   636             CleanupStack::PushL( buttonBar );
   634 
   637 
   635             CMPXVideoPlaybackControl* control =
   638             CMPXVideoPlaybackControl* control =
   636                 CMPXVideoPlaybackControl::NewL( this,
   639                 CMPXVideoPlaybackControl::NewL( this,
   637                                                 buttonBar,
   640                                                 buttonBar,
   638                                                 buttonBarRect.Rect(),
   641                                                 btBarRect,
   639                                                 aControlIndex,
   642                                                 aControlIndex,
   640                                                 properties );
   643                                                 properties );
   641 
   644 
   642             CleanupStack::PushL( control );
   645             CleanupStack::PushL( control );
   643 
   646 
   648             break;
   651             break;
   649         }
   652         }
   650         case EMPXVolumeBar:
   653         case EMPXVolumeBar:
   651         {
   654         {
   652             TAknLayoutRect volumeLayoutRect;
   655             TAknLayoutRect volumeLayoutRect;
   653             volumeLayoutRect.LayoutRect( iRect, popup_slider_window_cp01().LayoutLine() );
   656             volumeLayoutRect.LayoutRect( iRect, popup_slider_window_cp02().LayoutLine() );
   654 
   657             TRect rect = volumeLayoutRect.Rect();
   655             TRect temp = volumeLayoutRect.Rect();
       
   656             TRect rect = temp;
       
   657             rect.iTl.iY = temp.iTl.iY + temp.Height() / 10;
       
   658             rect.iBr.iY = temp.iTl.iY + temp.Height() / 10 * 9;
       
   659 
   658 
   660             CMPXVideoPlaybackVolumeBar* volBar = CMPXVideoPlaybackVolumeBar::NewL( this, rect );
   659             CMPXVideoPlaybackVolumeBar* volBar = CMPXVideoPlaybackVolumeBar::NewL( this, rect );
   661 
   660 
   662             CleanupStack::PushL( volBar );
   661             CleanupStack::PushL( volBar );
   663 
   662 
  1083     }
  1082     }
  1084 
  1083 
  1085     skRect = label->Rect();
  1084     skRect = label->Rect();
  1086 
  1085 
  1087     // Enlarge the button region to make it easy to be touched.
  1086     // Enlarge the button region to make it easy to be touched.
  1088     skRect.iTl.iY -= 6;
  1087     skRect.iTl.iY -= 26;
  1089     skRect.iBr.iY += 6;
  1088     skRect.iBr.iY += 6;
  1090 
  1089 
  1091     CMPXVideoPlaybackControl* control = CMPXVideoPlaybackControl::NewL( this,
  1090     CMPXVideoPlaybackControl* control = CMPXVideoPlaybackControl::NewL( this,
  1092                                                                         label,
  1091                                                                         label,
  1093                                                                         skRect,
  1092                                                                         skRect,