meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerdetailedsubjectfield.cpp
equal
deleted
inserted
replaced
25 #include "nmrlayoutmanager.h" |
25 #include "nmrlayoutmanager.h" |
26 #include "nmrbitmapmanager.h" |
26 #include "nmrbitmapmanager.h" |
27 #include "cesmrglobalnote.h" |
27 #include "cesmrglobalnote.h" |
28 |
28 |
29 #include <esmrgui.rsg> |
29 #include <esmrgui.rsg> |
30 #include <stringloader.h> |
30 #include <StringLoader.h> |
31 #include <calentry.h> |
31 #include <calentry.h> |
32 #include <aknlayout2scalabledef.h> |
32 #include <AknLayout2ScalableDef.h> |
33 |
33 |
34 // DEBUG |
34 // DEBUG |
35 #include "emailtrace.h" |
35 #include "emailtrace.h" |
36 |
36 |
37 // Unnamed namespace for local definitions and functions |
37 // Unnamed namespace for local definitions and functions |
510 // CESMRViewerDetailedSubjectField::SizeChanged |
510 // CESMRViewerDetailedSubjectField::SizeChanged |
511 // --------------------------------------------------------------------------- |
511 // --------------------------------------------------------------------------- |
512 // |
512 // |
513 void CESMRViewerDetailedSubjectField::SizeChanged( ) |
513 void CESMRViewerDetailedSubjectField::SizeChanged( ) |
514 { |
514 { |
|
515 // Store iRichTextViewer original width. |
|
516 TInt richTextViewerWidth = iRichTextViewer->Size().iWidth; |
515 TRect rect( Rect() ); |
517 TRect rect( Rect() ); |
516 |
518 |
517 TAknLayoutRect rowLayoutRect( |
519 TAknLayoutRect rowLayoutRect( |
518 NMRLayoutManager::GetFieldRowLayoutRect( rect, 1 ) ); |
520 NMRLayoutManager::GetFieldRowLayoutRect( rect, 1 ) ); |
519 TRect rowRect( rowLayoutRect.Rect() ); |
521 TRect rowRect( rowLayoutRect.Rect() ); |
568 // Try setting font |
570 // Try setting font |
569 iRichTextViewer->SetFontL( viewerLayoutText.Font() ); |
571 iRichTextViewer->SetFontL( viewerLayoutText.Font() ); |
570 // Try applying changes |
572 // Try applying changes |
571 iRichTextViewer->ApplyLayoutChangesL(); |
573 iRichTextViewer->ApplyLayoutChangesL(); |
572 ); |
574 ); |
|
575 |
|
576 if ( iRichTextViewer->Size().iWidth != richTextViewerWidth ) |
|
577 { |
|
578 // Most of this case is screen orientation, in this case we need to |
|
579 // Record the index of focusing link, after updating link array, then |
|
580 // reset the focusing to original one. |
|
581 TInt focusingIndex = iRichTextViewer->GetFocusLink(); |
|
582 if ( KErrNotFound != focusingIndex ) |
|
583 { |
|
584 iRichTextViewer->SetFocusLink( focusingIndex ); |
|
585 //wake up current contact menu selection by calling this |
|
586 iRichTextViewer->FocusChanged(ENoDrawNow); |
|
587 } |
|
588 } |
573 } |
589 } |
574 |
590 |
575 // --------------------------------------------------------------------------- |
591 // --------------------------------------------------------------------------- |
576 // CESMRViewerDetailedSubjectField::SetContainerWindowL |
592 // CESMRViewerDetailedSubjectField::SetContainerWindowL |
577 // --------------------------------------------------------------------------- |
593 // --------------------------------------------------------------------------- |