262 { |
262 { |
263 listLimits = AknLayoutScalable_Apps::list_calc_item_pane_ParamLimits(enTouch_disabled); |
263 listLimits = AknLayoutScalable_Apps::list_calc_item_pane_ParamLimits(enTouch_disabled); |
264 } |
264 } |
265 iCalcOutputSheetLines = (listLimits.LastRow()-listLimits.FirstRow()) + 1; |
265 iCalcOutputSheetLines = (listLimits.LastRow()-listLimits.FirstRow()) + 1; |
266 iOperatorLayout->ResizeL(iCalcOutputSheetLines); |
266 iOperatorLayout->ResizeL(iCalcOutputSheetLines); |
267 iOperandLayout->ResizeL(iCalcOutputSheetLines); |
267 iOperandLayout->ResizeL(iCalcOutputSheetLines); |
268 iResultsLineLayout->ResizeL(iCalcOutputSheetLines-1); |
268 iResultsLineLayout->ResizeL(iCalcOutputSheetLines-1); |
269 iEqualLineLayout->ResizeL(iCalcOutputSheetLines-1); |
269 iEqualLineLayout->ResizeL(iCalcOutputSheetLines-1); |
270 |
270 |
271 iOperatorLayout->Reset(); |
271 iOperatorLayout->Reset(); |
272 iOperandLayout->Reset(); |
272 iOperandLayout->Reset(); |
273 iResultsLineLayout->Reset(); |
273 iResultsLineLayout->Reset(); |
274 iEqualLineLayout->Reset(); |
274 iEqualLineLayout->Reset(); |
275 |
275 |
276 TAknLayoutRect rectParent; |
276 TAknLayoutRect rectParent; |
277 TAknWindowLineLayout layoutOfParentResultsLine; |
277 TAknWindowLineLayout layoutOfParentResultsLine; |
278 TAknLayoutRect rectListCalcPane; |
278 TAknLayoutRect rectListCalcPane; |
279 |
279 |
280 |
280 |
281 |
281 |
282 if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) |
282 if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) |
283 { |
283 { |
284 TAknWindowLineLayout calcPaperPane; |
284 TAknWindowLineLayout calcPaperPane; |
285 |
285 |
286 //For Touch UI Layouts, different configuration |
286 //For Touch UI Layouts, different configuration |
287 if( AknLayoutUtils::PenEnabled() ) |
287 if( AknLayoutUtils::PenEnabled() ) |
288 { |
288 { |
289 if (Layout_Meta_Data::IsLandscapeOrientation()) |
289 if (Layout_Meta_Data::IsLandscapeOrientation()) |
290 { |
290 { |
291 calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_lsc).LayoutLine(); |
291 calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_lsc).LayoutLine(); |
292 } |
292 } |
293 else |
293 else |
294 { |
294 { |
295 calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_prt).LayoutLine(); |
295 calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_prt).LayoutLine(); |
296 } |
296 } |
297 } |
297 } |
298 else |
298 else |
299 { |
299 { |
300 calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_disabled).LayoutLine(); |
300 calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_disabled).LayoutLine(); |
301 } |
301 } |
302 TAknLayoutRect rectcalcPaperPane; |
302 TAknLayoutRect rectcalcPaperPane; |
303 rectcalcPaperPane.LayoutRect(parentRect,calcPaperPane); |
303 rectcalcPaperPane.LayoutRect(parentRect,calcPaperPane); |
304 TAknWindowLineLayout layoutListCalcPane; |
304 iSBBrPoint = rectcalcPaperPane.Rect().iBr; |
305 if( AknLayoutUtils::PenEnabled() ) |
305 TAknWindowLineLayout layoutListCalcPane; |
306 { |
306 if( AknLayoutUtils::PenEnabled() ) |
307 layoutListCalcPane = AknLayoutScalable_Apps::list_calc_pane(enTouch_enabled).LayoutLine(); |
307 { |
308 } |
308 layoutListCalcPane = AknLayoutScalable_Apps::list_calc_pane(enTouch_enabled).LayoutLine(); |
309 else |
309 } |
310 { |
310 else |
311 layoutListCalcPane = AknLayoutScalable_Apps::list_calc_pane(enTouch_disabled).LayoutLine(); |
311 { |
312 } |
312 layoutListCalcPane = AknLayoutScalable_Apps::list_calc_pane(enTouch_disabled).LayoutLine(); |
313 |
313 } |
314 rectListCalcPane.LayoutRect(rectcalcPaperPane.Rect(),layoutListCalcPane); |
314 |
315 } |
315 rectListCalcPane.LayoutRect(rectcalcPaperPane.Rect(),layoutListCalcPane); |
316 |
316 } |
317 TInt nTimes=(iCalcOutputSheetLines-1); |
317 |
|
318 TInt nTimes=(iCalcOutputSheetLines-1); |
318 for (TInt cnt(0); cnt < iCalcOutputSheetLines; cnt++) |
319 for (TInt cnt(0); cnt < iCalcOutputSheetLines; cnt++) |
319 { |
320 { |
320 if (AknLayoutUtils::ScalableLayoutInterfaceAvailable()) |
321 if (AknLayoutUtils::ScalableLayoutInterfaceAvailable()) |
321 { |
322 { |
322 if(AknLayoutUtils::PenEnabled()) |
323 if(AknLayoutUtils::PenEnabled()) |
323 { |
324 { |
324 if (Layout_Meta_Data::IsLandscapeOrientation()) |
325 if (Layout_Meta_Data::IsLandscapeOrientation()) |
325 { |
326 { |
326 layoutOfParentResultsLine = AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_enabled).LayoutLine(); |
327 layoutOfParentResultsLine = AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_enabled).LayoutLine(); |
327 } |
328 } |
328 else |
329 else |
329 { |
330 { |
330 layoutOfParentResultsLine = AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_enabled).LayoutLine(); |
331 layoutOfParentResultsLine = AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_enabled).LayoutLine(); |
331 } |
332 } |
332 |
333 |
333 } |
334 } |
334 else |
335 else |
335 { |
336 { |
336 layoutOfParentResultsLine = AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_disabled).LayoutLine(); |
337 layoutOfParentResultsLine = AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_disabled).LayoutLine(); |
337 } |
338 } |
338 |
339 |
339 |
340 |
340 rectParent.LayoutRect(rectListCalcPane.Rect(),layoutOfParentResultsLine) ; |
341 rectParent.LayoutRect(rectListCalcPane.Rect(),layoutOfParentResultsLine) ; |
341 |
342 |
342 TAknLayoutText operatorLayout; |
343 TAknLayoutText operatorLayout; |
343 TAknLayoutText operendLayout; |
344 TAknLayoutText operendLayout; |
344 if(AknLayoutUtils::PenEnabled()) |
345 if(AknLayoutUtils::PenEnabled()) |
345 { |
346 { |
346 operatorLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t2(enTouch_with_prt).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); |
347 operatorLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t2(enTouch_with_prt).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); |
347 iOperatorLayout->AppendL(operatorLayout); |
348 iOperatorLayout->AppendL(operatorLayout); |
348 |
349 |
349 operendLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t1(enTouch_with_lsc).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); |
350 operendLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t1(enTouch_with_lsc).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); |
350 iOperandLayout->AppendL(operendLayout); |
351 iOperandLayout->AppendL(operendLayout); |
351 } |
352 } |
352 else |
353 else |
353 { |
354 { |
354 operatorLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t2(enTouch_disabled).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); |
355 operatorLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t2(enTouch_disabled).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); |
355 iOperatorLayout->AppendL(operatorLayout); |
356 iOperatorLayout->AppendL(operatorLayout); |
356 |
357 |
357 operendLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t1(enTouch_disabled).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); |
358 operendLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t1(enTouch_disabled).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); |
358 iOperandLayout->AppendL(operendLayout); |
359 iOperandLayout->AppendL(operendLayout); |
359 } |
360 } |
360 |
361 |
361 // aCustomFont |
362 // aCustomFont |
362 --nTimes; |
363 --nTimes; |
363 |
364 |
364 } |
365 } |
365 |
366 |
366 else |
367 else |
367 { |
368 { |
368 |
369 |
369 |
370 |
370 //Scalable UI. |
371 //Scalable UI. |
371 |
372 |
372 TAknLayoutText operatorLayout; |
373 TAknLayoutText operatorLayout; |
373 TAknLayoutText operendLayout; |
374 TAknLayoutText operendLayout; |
374 operatorLayout.LayoutText(parentRect,AppLayout::Calculator_texts_Line_8(nTimes),iCalcAppEnv->OutSheetOperatorFont()); // aCustomFont |
375 operatorLayout.LayoutText(parentRect,AppLayout::Calculator_texts_Line_8(nTimes),iCalcAppEnv->OutSheetOperatorFont()); // aCustomFont |
375 iOperatorLayout->AppendL(operatorLayout); |
376 iOperatorLayout->AppendL(operatorLayout); |
376 |
377 |
377 operendLayout.LayoutText(parentRect,AppLayout::Calculator_texts_Line_7(nTimes), NULL); |
378 operendLayout.LayoutText(parentRect,AppLayout::Calculator_texts_Line_7(nTimes), NULL); |
378 iOperandLayout->AppendL(operendLayout); |
379 iOperandLayout->AppendL(operendLayout); |
379 --nTimes; |
380 --nTimes; |
380 } |
381 } |
381 } |
382 } |
382 |
383 |
383 //Scalable UI. |
384 //Scalable UI. |
384 nTimes = iCalcOutputSheetLines - 2; |
385 nTimes = iCalcOutputSheetLines - 2; |
385 for (TInt ii(0); ii < (iCalcOutputSheetLines - 1); ii++) |
386 for (TInt ii(0); ii < (iCalcOutputSheetLines - 1); ii++) |
386 { |
387 { |
387 |
388 |
388 |
389 |
389 if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) |
390 if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) |
390 { |
391 { |
391 #ifdef __SCALABLE_ICONS |
392 #ifdef __SCALABLE_ICONS |
392 layoutOfParentResultsLine = AknLayoutScalable_Apps::list_calc_item_pane(nTimes).LayoutLine(); |
393 layoutOfParentResultsLine = AknLayoutScalable_Apps::list_calc_item_pane(nTimes).LayoutLine(); |
393 |
394 |
394 rectParent.LayoutRect(rectListCalcPane.Rect(),layoutOfParentResultsLine) ; |
395 rectParent.LayoutRect(rectListCalcPane.Rect(),layoutOfParentResultsLine) ; |
395 TAknWindowLineLayout layoutOfResultsLine = AknLayoutScalable_Apps::list_calc_item_pane_g1().LayoutLine(); |
396 TAknWindowLineLayout layoutOfResultsLine = AknLayoutScalable_Apps::list_calc_item_pane_g1().LayoutLine(); |
396 TAknLayoutRect lineLayout; |
397 TAknLayoutRect lineLayout; |
397 lineLayout.LayoutRect(rectParent.Rect(),layoutOfResultsLine); |
398 lineLayout.LayoutRect(rectParent.Rect(),layoutOfResultsLine); |
398 iResultsLineLayout->AppendL(lineLayout); |
399 iResultsLineLayout->AppendL(lineLayout); |
399 #else |
400 #else |
400 TAknLayoutRect lineLayout; |
401 TAknLayoutRect lineLayout; |
401 lineLayout.LayoutRect(parentRect,AppLayout::Calculator_elements_Line_3(nTimes)); |
402 lineLayout.LayoutRect(parentRect,AppLayout::Calculator_elements_Line_3(nTimes)); |
402 iEqualLineLayout->AppendL(lineLayout); |
403 iEqualLineLayout->AppendL(lineLayout); |
403 #endif |
404 #endif |
404 } |
405 } |
405 else |
406 else |
406 { |
407 { |
407 TAknLayoutRect lineLayout; |
408 TAknLayoutRect lineLayout; |
408 lineLayout.LayoutRect(parentRect,AppLayout::Calculator_elements_Line_3(nTimes)); |
409 lineLayout.LayoutRect(parentRect,AppLayout::Calculator_elements_Line_3(nTimes)); |
409 iEqualLineLayout->AppendL(lineLayout); |
410 iEqualLineLayout->AppendL(lineLayout); |
410 } |
411 } |
411 |
412 |
412 --nTimes; |
413 --nTimes; |
413 } |
414 } |
414 |
415 |
415 TAknLayoutRect paperRect; |
416 TAknLayoutRect paperRect; |
416 if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) |
417 if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) |
417 { |
418 { |
418 TAknLayoutRect rectCalcPaperPane; |
419 TAknLayoutRect rectCalcPaperPane; |
419 TAknLayoutRect rectbgCalcPaperPane; |
420 TAknLayoutRect rectbgCalcPaperPane; |
420 //Different configuration for Touch Layouts |
421 //Different configuration for Touch Layouts |
421 if( AknLayoutUtils::PenEnabled() ) |
422 if( AknLayoutUtils::PenEnabled() ) |
422 { |
423 { |
423 //In landscape mode different configuration is needed |
424 //In landscape mode different configuration is needed |
424 if (Layout_Meta_Data::IsLandscapeOrientation()) |
425 if (Layout_Meta_Data::IsLandscapeOrientation()) |
425 { |
426 { |
426 rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_lsc).LayoutLine()); |
427 rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_lsc).LayoutLine()); |
427 } |
428 } |
428 else |
429 else |
429 { |
430 { |
430 rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_prt).LayoutLine()); |
431 rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_prt).LayoutLine()); |
431 } |
432 } |
432 rectbgCalcPaperPane.LayoutRect(rectCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane(enTouch_enabled).LayoutLine()); |
433 rectbgCalcPaperPane.LayoutRect(rectCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane(enTouch_enabled).LayoutLine()); |
433 } |
434 } |
434 else |
435 else |
435 { |
436 { |
436 rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_disabled).LayoutLine()); |
437 rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_disabled).LayoutLine()); |
437 rectbgCalcPaperPane.LayoutRect(rectCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane().LayoutLine()); |
438 rectbgCalcPaperPane.LayoutRect(rectCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane().LayoutLine()); |
438 } |
439 } |
439 |
440 |
440 iPaperPaneRect = rectCalcPaperPane; |
441 iPaperPaneRect = rectCalcPaperPane; |
441 |
442 |
442 |
443 |
443 iCalcPaperLayout[0].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g1().LayoutLine()); |
444 iCalcPaperLayout[0].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g1().LayoutLine()); |
444 iCalcPaperLayout[1].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g2().LayoutLine()); |
445 iCalcPaperLayout[1].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g2().LayoutLine()); |
445 iCalcPaperLayout[2].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g3().LayoutLine()); |
446 iCalcPaperLayout[2].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g3().LayoutLine()); |
446 iCalcPaperLayout[3].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g4().LayoutLine()); |
447 iCalcPaperLayout[3].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g4().LayoutLine()); |
447 iCalcPaperLayout[4].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g5().LayoutLine()); |
448 iCalcPaperLayout[4].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g5().LayoutLine()); |
448 iCalcPaperLayout[5].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g6().LayoutLine()); |
449 iCalcPaperLayout[5].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g6().LayoutLine()); |
449 iCalcPaperLayout[6].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g7().LayoutLine()); |
450 iCalcPaperLayout[6].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g7().LayoutLine()); |
450 iCalcPaperLayout[7].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g8().LayoutLine()); |
451 iCalcPaperLayout[7].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g8().LayoutLine()); |
451 iCalcPaperLayout[8].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::calc_bg_paper_pane_g9().LayoutLine()); |
452 iCalcPaperLayout[8].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::calc_bg_paper_pane_g9().LayoutLine()); |
452 } |
453 } |
453 |
454 |
454 iOpSheetContext->SetRect(Rect()); |
455 iOpSheetContext->SetRect(Rect()); |
455 |
456 |
456 //Only for touch UI, scrollbars are present |
457 //Only for touch UI, scrollbars are present |
457 if( AknLayoutUtils::PenEnabled() ) |
458 if( AknLayoutUtils::PenEnabled() ) |
458 { |
459 { |
459 UpdateScrollIndicatorL(); |
460 UpdateScrollIndicatorL(); |
460 } |
461 } |
461 else |
462 else |
462 { |
463 { |
591 AknsDrawUtils::Background( AknsUtils:: SkinInstance(), AknsDrawUtils::ControlContext(this), this, gc, rect ); |
613 AknsDrawUtils::Background( AknsUtils:: SkinInstance(), AknsDrawUtils::ControlContext(this), this, gc, rect ); |
592 |
614 |
593 |
615 |
594 gc.SetBrushStyle(CGraphicsContext::ENullBrush); |
616 gc.SetBrushStyle(CGraphicsContext::ENullBrush); |
595 gc.SetPenStyle(CGraphicsContext::ENullPen); |
617 gc.SetPenStyle(CGraphicsContext::ENullPen); |
596 //set the size of the bitmap. SVG-T upgrade. |
618 //set the size of the bitmap. SVG-T upgrade. |
597 CAknsItemData* idata = NULL; |
619 CAknsItemData* idata = NULL; |
598 if (skin) |
620 if (skin) |
599 { |
621 { |
600 idata = skin->GetCachedItemData( KAknsIIDQsnFrCalcPaper); |
622 idata = skin->GetCachedItemData( KAknsIIDQsnFrCalcPaper); |
601 } |
623 } |
602 |
624 |
603 if ( idata && idata->Type() == EAknsITImageTable ) |
625 if ( idata && idata->Type() == EAknsITImageTable ) |
604 { |
626 { |
605 if ( AknLayoutUtils::PenEnabled() ) |
627 if ( AknLayoutUtils::PenEnabled() ) |
606 {//when touch input,the paper become bigger,so it needs only one paper |
628 {//when touch input,the paper become bigger,so it needs only one paper |
607 AknIconUtils::SetSize(iCalcScalablePaper[0]->Bitmap(),iCalcPaperLayout[0].Rect().Size(),EAspectRatioNotPreserved); |
629 AknIconUtils::SetSize(iCalcScalablePaper[0]->Bitmap(),iCalcPaperLayout[0].Rect().Size(),EAspectRatioNotPreserved); |
608 AknIconUtils::SetSize(iCalcScalablePaper[0]->Mask(),iCalcPaperLayout[0].Rect().Size(),EAspectRatioNotPreserved); |
630 AknIconUtils::SetSize(iCalcScalablePaper[0]->Mask(),iCalcPaperLayout[0].Rect().Size(),EAspectRatioNotPreserved); |
609 iCalcPaperLayout[0].DrawImage(gc, iCalcScalablePaper[0]->Bitmap(),iCalcScalablePaper[0]->Mask()); |
631 iCalcPaperLayout[0].DrawImage(gc, iCalcScalablePaper[0]->Bitmap(),iCalcScalablePaper[0]->Mask()); |
610 } |
632 } |
611 else |
633 else |
612 { |
634 { |
613 for(TInt Cnt=0;Cnt < 9; Cnt++) |
635 for(TInt Cnt=0;Cnt < 9; Cnt++) |
614 { |
636 { |
615 AknIconUtils::SetSize(iCalcScalablePaper[Cnt]->Bitmap(),iCalcPaperLayout[Cnt].Rect().Size(),EAspectRatioNotPreserved); |
637 AknIconUtils::SetSize(iCalcScalablePaper[Cnt]->Bitmap(),iCalcPaperLayout[Cnt].Rect().Size(),EAspectRatioNotPreserved); |
616 AknIconUtils::SetSize(iCalcScalablePaper[Cnt]->Mask(),iCalcPaperLayout[Cnt].Rect().Size(),EAspectRatioNotPreserved); |
638 AknIconUtils::SetSize(iCalcScalablePaper[Cnt]->Mask(),iCalcPaperLayout[Cnt].Rect().Size(),EAspectRatioNotPreserved); |
617 iCalcPaperLayout[Cnt].DrawImage(gc, iCalcScalablePaper[Cnt]->Bitmap(),iCalcScalablePaper[Cnt]->Mask()); |
639 iCalcPaperLayout[Cnt].DrawImage(gc, iCalcScalablePaper[Cnt]->Bitmap(),iCalcScalablePaper[Cnt]->Mask()); |
618 } |
640 } |
619 } |
641 } |
620 } |
642 } |
621 else |
643 else |
622 { |
644 { |
623 // Make outsheet displayed in Jingmask is the same size as in other themes |
645 // Make outsheet displayed in Jingmask is the same size as in other themes |
624 // when there is a scrollbar on outsheet. |
646 // when there is a scrollbar on outsheet. |
625 if ( AknLayoutUtils::PenEnabled() ) |
647 if ( AknLayoutUtils::PenEnabled() ) |
627 AknsDrawUtils::Background( AknsUtils:: SkinInstance(), iOpSheetContext, this, gc, iCalcPaperLayout[0].Rect() ); |
649 AknsDrawUtils::Background( AknsUtils:: SkinInstance(), iOpSheetContext, this, gc, iCalcPaperLayout[0].Rect() ); |
628 } |
650 } |
629 else |
651 else |
630 { |
652 { |
631 AknsDrawUtils::Background( AknsUtils:: SkinInstance(), iOpSheetContext, this, gc, rect ); |
653 AknsDrawUtils::Background( AknsUtils:: SkinInstance(), iOpSheetContext, this, gc, rect ); |
632 } |
654 } |
633 } |
655 } |
634 |
656 |
635 |
657 |
636 for (TInt loop(iCalcOutputSheetLines - 1); loop >= 0; loop--) |
658 for (TInt loop(iCalcOutputSheetLines - 1); loop >= 0; loop--) |
637 { |
659 { |
638 const TCalcEditLine& history = (*iCalcHistory)[loop + iScrollOffset]; |
660 const TCalcEditLine& history = (*iCalcHistory)[loop + iScrollOffset]; |
639 TCalcEditLine::TCalcOperatorType operatorType( |
661 TCalcEditLine::TCalcOperatorType operatorType( |
640 history.Operator()); |
662 history.Operator()); |
641 |
663 |
642 if (loop < iCalcOutputSheetLines - 1) |
664 if (loop < iCalcOutputSheetLines - 1) |
643 { |
665 { |
644 // When an operator is Equal, a line is drawn at an upper end. |
666 // When an operator is Equal, a line is drawn at an upper end. |
645 if (TCalcEditLine::ECalcEqual == operatorType) |
667 if (TCalcEditLine::ECalcEqual == operatorType) |
646 { |
668 { |
647 TRgb ResultsLineolor; |
669 TRgb ResultsLineolor; |
648 TInt error1 = AknsUtils::GetCachedColor( skin, ResultsLineolor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG29); |
670 TInt error1 = AknsUtils::GetCachedColor( skin, ResultsLineolor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG29); |
649 if(error1 == KErrNone) |
671 if(error1 == KErrNone) |
650 { |
672 { |
651 AknIconUtils::SetIconColor(iCalcResultsLine->Bitmap(),ResultsLineolor); |
673 AknIconUtils::SetIconColor(iCalcResultsLine->Bitmap(),ResultsLineolor); |
652 } |
674 } |
653 if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) |
675 if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() ) |
654 { |
676 { |
655 #ifdef __SCALABLE_ICONS |
677 #ifdef __SCALABLE_ICONS |
656 TAknLayoutRect& lineLayout = iResultsLineLayout->At(loop); |
678 TAknLayoutRect& lineLayout = iResultsLineLayout->At(loop); |
657 AknIconUtils::SetSize(iCalcResultsLine->Bitmap(),lineLayout.Rect().Size(),EAspectRatioNotPreserved); |
679 AknIconUtils::SetSize(iCalcResultsLine->Bitmap(),lineLayout.Rect().Size(),EAspectRatioNotPreserved); |
658 AknIconUtils::SetSize(iCalcResultsLine->Mask(),lineLayout.Rect().Size(),EAspectRatioNotPreserved); |
680 AknIconUtils::SetSize(iCalcResultsLine->Mask(),lineLayout.Rect().Size(),EAspectRatioNotPreserved); |
659 lineLayout.DrawImage(gc, iCalcResultsLine->Bitmap(),iCalcResultsLine->Mask()); |
681 lineLayout.DrawImage(gc, iCalcResultsLine->Bitmap(),iCalcResultsLine->Mask()); |
660 #else |
682 #else |
661 TAknLayoutRect& equalLineLayout= iEqualLineLayout->At(loop); |
683 TAknLayoutRect& equalLineLayout= iEqualLineLayout->At(loop); |
662 TRect rectLine = equalLineLayout.Rect(); |
684 TRect rectLine = equalLineLayout.Rect(); |
663 equalLineLayout.DrawRect(gc); |
685 equalLineLayout.DrawRect(gc); |
664 #endif |
686 #endif |
665 } |
687 } |
666 else |
688 else |
667 { |
689 { |
668 TAknLayoutRect& equalLineLayout= iEqualLineLayout->At(loop); |
690 TAknLayoutRect& equalLineLayout= iEqualLineLayout->At(loop); |
669 TRect rectLine = equalLineLayout.Rect(); |
691 TRect rectLine = equalLineLayout.Rect(); |
670 equalLineLayout.DrawRect(gc); |
692 equalLineLayout.DrawRect(gc); |
671 } |
693 } |
672 } |
694 } |
673 } |
695 } |
674 TRgb color; |
696 TRgb color; |
675 TInt error = AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG29); |
697 TInt error = AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG29); |
676 if(error == KErrNone) |
698 if(error == KErrNone) |
677 { |
699 { |
678 gc.SetPenColor(color); |
700 gc.SetPenColor(color); |
679 } |
701 } |
680 |
702 |
681 //change TBuf<10> to TBuf<KCalcMaxNumberWidth> |
703 //change TBuf<10> to TBuf<KCalcMaxNumberWidth> |
682 TBuf<KCalcMaxNumberWidth> keyvalue; |
704 TBuf<KCalcMaxNumberWidth> keyvalue; |
683 |
705 |
684 keyvalue.Append(history.NumberString()); |
706 keyvalue.Append(history.NumberString()); |
685 AknTextUtils::LanguageSpecificNumberConversion (keyvalue); |
707 AknTextUtils::LanguageSpecificNumberConversion (keyvalue); |
686 // An operand's drawing |
708 // An operand's drawing |
687 TAknLayoutText& operendLayout = iOperandLayout->At(loop); |
709 TAknLayoutText& operendLayout = iOperandLayout->At(loop); |
688 |
710 |
689 if ( iUiLanguage == ELangFarsi || iUiLanguage == ELangHindi || |
711 if ( iUiLanguage == ELangFarsi || iUiLanguage == ELangHindi || |
690 iUiLanguage == ELangUrdu || iUiLanguage == ELangArabic ) |
712 iUiLanguage == ELangUrdu || iUiLanguage == ELangArabic ) |
691 { |
713 { |
692 if( iUiLanguage == ELangUrdu || iUiLanguage == ELangArabic ) |
714 if( iUiLanguage == ELangUrdu || iUiLanguage == ELangArabic ) |
693 { |
715 { |
694 TInt len = keyvalue.Length(); |
716 TInt len = keyvalue.Length(); |
695 TInt pos = KErrNotFound; |
717 TInt pos = KErrNotFound; |
696 TBuf<1> ch; |
718 TBuf<1> ch; |
697 ch.Append(iCalcAppEnv->MinusIndicator()); |
719 ch.Append(iCalcAppEnv->MinusIndicator()); |
698 if( (pos = keyvalue.Locate(iCalcAppEnv->MinusIndicator())) != KErrNotFound && |
720 if( (pos = keyvalue.Locate(iCalcAppEnv->MinusIndicator())) != KErrNotFound && |
699 pos == keyvalue.LocateReverse(iCalcAppEnv->MinusIndicator())) |
721 pos == keyvalue.LocateReverse(iCalcAppEnv->MinusIndicator())) |
700 { |
722 { |
701 keyvalue.Delete( pos, 1 ); |
723 keyvalue.Delete( pos, 1 ); |
702 keyvalue.Insert( 0, ch ); |
724 keyvalue.Insert( 0, ch ); |
703 } |
725 } |
704 } |
726 } |
705 operendLayout.DrawText(gc,keyvalue,EFalse,color); |
727 operendLayout.DrawText(gc,keyvalue,EFalse,color); |
706 } |
728 } |
707 else |
729 else |
708 { |
730 { |
709 operendLayout.DrawText(gc,history.NumberString(),EFalse,color); |
731 operendLayout.DrawText(gc,history.NumberString(),EFalse,color); |
710 } |
732 } |
711 // An operator's drawing |
733 // An operator's drawing |
712 TPtrC operatorString( |
734 TPtrC operatorString( |
713 iCalcAppEnv->OutSheetOperator(operatorType)); |
735 iCalcAppEnv->OutSheetOperator(operatorType)); |
714 TAknLayoutText& operatorLayout = iOperatorLayout->At(loop); |
736 TAknLayoutText& operatorLayout = iOperatorLayout->At(loop); |
715 operatorLayout.DrawText(gc, operatorString , EFalse, color); |
737 operatorLayout.DrawText(gc, operatorString , EFalse, color); |
716 } |
738 } |
717 |
739 |
718 |
740 |
719 } |
741 } |
720 |
742 |