274 TInt x = Rect().Width()/2 - iBitmap->SizeInPixels().iWidth /2; |
274 TInt x = Rect().Width()/2 - iBitmap->SizeInPixels().iWidth /2; |
275 // and do same with y |
275 // and do same with y |
276 TInt y = Rect().Height()/2 - iBitmap->SizeInPixels().iHeight/2; |
276 TInt y = Rect().Height()/2 - iBitmap->SizeInPixels().iHeight/2; |
277 TInt width =iBitmap->SizeInPixels().iWidth; |
277 TInt width =iBitmap->SizeInPixels().iWidth; |
278 TInt height =iBitmap->SizeInPixels().iHeight; |
278 TInt height =iBitmap->SizeInPixels().iHeight; |
|
279 |
|
280 TInt gripStatus = EPSHWRMGripClosed; |
|
281 RProperty::Get( KPSUidHWRM, KHWRMGripStatus, gripStatus ); |
|
282 #if defined(_DEBUG) |
|
283 RDebug::Printf( "%s %s (%u) gripStatus=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, gripStatus ); |
|
284 #endif |
|
285 |
279 TInt callState = 0; |
286 TInt callState = 0; |
280 RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, callState ); |
287 RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, callState ); |
281 if ( callState == EPSCTsyCallStateNone || callState == EPSCTsyCallStateUninitialized ) |
288 if ( callState == EPSCTsyCallStateNone || callState == EPSCTsyCallStateUninitialized ) |
282 { |
289 { |
283 } |
290 } |
284 else |
291 else |
285 { |
292 { |
286 y-=100; |
293 if (gripStatus != EPSHWRMGripOpen) |
|
294 y-=100; |
287 } |
295 } |
288 |
296 |
289 if (iBitmap && iMask) |
297 if (iBitmap && iMask) |
290 { |
298 { |
291 // gc.BitBltMasked(TPoint(x,y),iBitmap,TRect(TPoint(0,0),iBitmap->SizeInPixels()), iMask, ETrue); |
299 // gc.BitBltMasked(TPoint(x,y),iBitmap,TRect(TPoint(0,0),iBitmap->SizeInPixels()), iMask, ETrue); |
293 if ( callState == EPSCTsyCallStateNone || callState == EPSCTsyCallStateUninitialized ) |
301 if ( callState == EPSCTsyCallStateNone || callState == EPSCTsyCallStateUninitialized ) |
294 { |
302 { |
295 } |
303 } |
296 else |
304 else |
297 { |
305 { |
298 aCallRect_x=Rect().Width()/2 - iBitmapCall->SizeInPixels().iWidth/2; |
306 if (gripStatus != EPSHWRMGripOpen) |
299 aCallRect_y=Rect().Height() * 0.75; |
307 { |
|
308 aCallRect_x=Rect().Width()/2 - iBitmapCall->SizeInPixels().iWidth/2; |
|
309 aCallRect_y=Rect().Height() * 0.75; |
|
310 } |
|
311 else |
|
312 { |
|
313 aCallRect_x=Rect().Width()* 0.75 - iBitmapCall->SizeInPixels().iWidth/2; |
|
314 aCallRect_y = Rect().Height()/2-3*10; |
|
315 } |
300 aCallRect_width=iBitmapCall->SizeInPixels().iWidth; |
316 aCallRect_width=iBitmapCall->SizeInPixels().iWidth; |
301 aCallRect_height=iBitmapCall->SizeInPixels().iHeight; |
317 aCallRect_height=iBitmapCall->SizeInPixels().iHeight; |
302 TSize cornerSize(20,20); |
318 TSize cornerSize(20,20); |
303 TSize cornerEllipseSize(cornerSize.iHeight*2,cornerSize.iWidth*2); |
319 TSize cornerEllipseSize(cornerSize.iHeight*2,cornerSize.iWidth*2); |
304 TRect box(aCallRect_x-3*10 , aCallRect_y-3*10, aCallRect_x+aCallRect_width+3*10, aCallRect_y+aCallRect_height+3*10); |
320 TRect box(aCallRect_x-3*10 , aCallRect_y-3*10, aCallRect_x+aCallRect_width+3*10, aCallRect_y+aCallRect_height+3*10); |
306 gc.SetBrushColor(KRgbRed); |
322 gc.SetBrushColor(KRgbRed); |
307 gc.SetBrushStyle(CGraphicsContext::ESolidBrush); |
323 gc.SetBrushStyle(CGraphicsContext::ESolidBrush); |
308 gc.SetPenStyle(CGraphicsContext::EDottedPen); |
324 gc.SetPenStyle(CGraphicsContext::EDottedPen); |
309 gc.DrawRoundRect(box,cornerSize); |
325 gc.DrawRoundRect(box,cornerSize); |
310 gc.BitBltMasked(TPoint(aCallRect_x,aCallRect_y),iBitmapCall,TRect(TPoint(0,0),TPoint(aCallRect_width,aCallRect_height)), iMaskCall, ETrue); |
326 gc.BitBltMasked(TPoint(aCallRect_x,aCallRect_y),iBitmapCall,TRect(TPoint(0,0),TPoint(aCallRect_width,aCallRect_height)), iMaskCall, ETrue); |
311 aCallRect_y+=100; // coordinates are relative to TRect, not to Screen |
327 if (gripStatus != EPSHWRMGripOpen) |
|
328 aCallRect_y+=100; // coordinates are relative to TRect, not to Screen |
312 |
329 |
313 // if active call, dismiss all pending notes. This avoids them on top of the BigRedButton |
330 // if active call, dismiss all pending notes. This avoids them on top of the BigRedButton |
314 CAknSoftNotifier *softNotifier = NULL; |
331 CAknSoftNotifier *softNotifier = NULL; |
315 TRAPD (err, { |
332 TRAPD (err, { |
316 softNotifier = CAknSoftNotifier::NewL(); |
333 softNotifier = CAknSoftNotifier::NewL(); |