48 // Symbian 2nd phase constructor can leave. |
49 // Symbian 2nd phase constructor can leave. |
49 // ------------------------------------------------------------------------------------------------- |
50 // ------------------------------------------------------------------------------------------------- |
50 // |
51 // |
51 void CMPXVideoPlaybackAspectRatioIcon::ConstructL( TRect aRect ) |
52 void CMPXVideoPlaybackAspectRatioIcon::ConstructL( TRect aRect ) |
52 { |
53 { |
53 MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::ConstructL()")); |
54 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackAspectRatioIcon::ConstructL()")); |
54 |
55 |
55 SetRect( TRect( 0, 0, aRect.Width(), aRect.Height() ) ); |
56 SetRect( TRect( 0, 0, aRect.Width(), aRect.Height() ) ); |
56 |
57 |
57 iAspectRatioRect = TRect( Rect().iTl.iX + 15, |
58 iAspectRatioRect = TRect( Rect().iTl.iX + 15, |
58 Rect().iTl.iY + 15, |
59 Rect().iTl.iY + 15, |
125 // CMPXVideoPlaybackAspectRatioIcon::SkinChangeL() |
126 // CMPXVideoPlaybackAspectRatioIcon::SkinChangeL() |
126 // ------------------------------------------------------------------------------------------------- |
127 // ------------------------------------------------------------------------------------------------- |
127 // |
128 // |
128 void CMPXVideoPlaybackAspectRatioIcon::SkinChangeL() |
129 void CMPXVideoPlaybackAspectRatioIcon::SkinChangeL() |
129 { |
130 { |
130 MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::SkinChangeL()")); |
131 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackAspectRatioIcon::SkinChangeL()")); |
131 |
132 |
132 // |
133 // |
133 // Create icons |
134 // Create icons |
134 // |
135 // |
135 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
136 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
216 MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::Draw()")); |
217 MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::Draw()")); |
217 |
218 |
218 CWindowGc& gc = SystemGc(); |
219 CWindowGc& gc = SystemGc(); |
219 gc.SetClippingRect( aRect ); |
220 gc.SetClippingRect( aRect ); |
220 |
221 |
221 if ( iController->SetBackgroundBlack() ) |
222 if ( Window().DisplayMode() == EColor16MAP ) |
222 { |
223 { |
223 if ( Window().DisplayMode() == EColor16MAP ) |
224 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
224 { |
225 gc.SetBrushColor( TRgb::Color16MAP( 255 ) ); |
225 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
226 gc.Clear( aRect ); |
226 gc.SetBrushColor( TRgb::Color16MAP( 255 ) ); |
227 } |
227 gc.Clear( aRect ); |
228 else if ( Window().DisplayMode() == EColor16MA ) |
228 } |
229 { |
229 else if ( Window().DisplayMode() == EColor16MA ) |
230 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
230 { |
231 gc.SetBrushColor( TRgb::Color16MA( 0 ) ); |
231 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
232 gc.Clear( aRect ); |
232 gc.SetBrushColor( TRgb::Color16MA( 0 ) ); |
233 } |
233 gc.Clear( aRect ); |
234 |
234 } |
235 switch ( iController->AspectRatio() ) |
235 } |
|
236 else |
|
237 { |
|
238 // draw a solid background so that the entire progress |
|
239 // bar is shown not just the area representing the |
|
240 // portion that has been played. |
|
241 gc.SetBrushColor( KRgbBlack ); |
|
242 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
243 gc.DrawRect( aRect ); |
|
244 gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
245 } |
|
246 |
|
247 switch( iAspectRatio ) |
|
248 { |
236 { |
249 case EMMFStretch: |
237 case EMMFStretch: |
250 { |
238 { |
251 gc.BitBltMasked( iAspectRatioRect.iTl, |
239 gc.BitBltMasked( iAspectRatioRect.iTl, |
252 iZoomIcon->Bitmap(), |
240 iZoomIcon->Bitmap(), |
280 // CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL() |
268 // CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL() |
281 // ------------------------------------------------------------------------------------------------- |
269 // ------------------------------------------------------------------------------------------------- |
282 // |
270 // |
283 void CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL( const TPointerEvent& aPointerEvent ) |
271 void CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL( const TPointerEvent& aPointerEvent ) |
284 { |
272 { |
285 MPX_DEBUG(_L("CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL()")); |
273 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackAspectRatioIcon::HandlePointerEventL()"), |
|
274 _L("aPointerEvent.iType = %d"), aPointerEvent.iType ); |
286 |
275 |
287 if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) |
276 if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) |
288 { |
277 { |
289 #ifdef RD_TACTILE_FEEDBACK |
278 #ifdef RD_TACTILE_FEEDBACK |
290 if ( iFeedback ) |
279 if ( iFeedback ) |