--- a/meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerpriorityfield.cpp Tue May 25 12:23:16 2010 +0300
+++ b/meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerpriorityfield.cpp Wed Jun 09 09:22:57 2010 +0300
@@ -81,10 +81,10 @@
iLabel = CMRLabel::NewL();
iLabel->SetParent( this );
CESMRField::ConstructL( iLabel ); // ownership transfered
-
+
iIcon = CMRImage::NewL( NMRBitmapManager::EMRBitmapPriorityNormal );
iIcon->SetParent( this );
-
+
HBufC* priorityText = StringLoader::LoadLC(
R_QTN_CALENDAR_MEETING_OPT_PRIORITY_NORMAL,
iEikonEnv );
@@ -182,43 +182,41 @@
TAknLayoutRect rowLayoutRect =
NMRLayoutManager::GetFieldRowLayoutRect( rect, 1 );
rect = rowLayoutRect.Rect();
-
+
TAknWindowComponentLayout iconLayout =
- NMRLayoutManager::GetWindowComponentLayout(
+ NMRLayoutManager::GetWindowComponentLayout(
NMRLayoutManager::EMRLayoutTextEditorIcon );
AknLayoutUtils::LayoutImage( iIcon, rect, iconLayout );
-
+
// Layouting lock icon
if( iLockIcon )
{
- TAknWindowComponentLayout iconLayout(
- NMRLayoutManager::GetWindowComponentLayout(
+ TAknWindowComponentLayout iconLayout(
+ NMRLayoutManager::GetWindowComponentLayout(
NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) );
AknLayoutUtils::LayoutImage( iLockIcon, rect, iconLayout );
}
-
+
// Layouting label
- TAknLayoutText viewerLayoutText;
+ TAknTextComponentLayout viewerLayoutText;
+
if( iLockIcon )
- {
- viewerLayoutText = NMRLayoutManager::GetLayoutText( rect,
- NMRLayoutManager::EMRTextLayoutSingleRowEditorText );
- }
+ {
+ viewerLayoutText = NMRLayoutManager::GetTextComponentLayout(
+ NMRLayoutManager::EMRTextLayoutSingleRowEditorText );
+ }
else
- {
- viewerLayoutText = NMRLayoutManager::GetLayoutText( rect,
- NMRLayoutManager::EMRTextLayoutTextEditor );
- }
+ {
+ viewerLayoutText = NMRLayoutManager::GetTextComponentLayout(
+ NMRLayoutManager::EMRTextLayoutTextEditor );
+ }
- TRect viewerRect( viewerLayoutText.TextRect() );
- iLabel->SetRect( viewerRect );
+ AknLayoutUtils::LayoutLabel( iLabel, rect, viewerLayoutText );
+ TRect viewerRect( iLabel->Rect() );
// Move focus rect so that it's relative to field's position.
viewerRect.Move( -Position() );
SetFocusRect( viewerRect );
-
- // Setting font also for the label
- iLabel->SetFont( viewerLayoutText.Font() );
}
// ---------------------------------------------------------------------------
@@ -273,8 +271,8 @@
{
FUNC_LOG;
CESMRField::SetOutlineFocusL ( aFocus );
-
- iLabel->SetFocus( aFocus );
+
+ iLabel->SetFocus( aFocus );
}
// ---------------------------------------------------------------------------
@@ -288,9 +286,9 @@
{
return;
}
-
+
CESMRField::LockL();
-
+
delete iLockIcon;
iLockIcon = NULL;
iLockIcon = CMRImage::NewL( NMRBitmapManager::EMRBitmapLockField, ETrue );
@@ -310,7 +308,7 @@
if( (aCommand == EAknCmdOpen) && IsLocked() )
{
HandleTactileFeedbackL();
-
+
CESMRGlobalNote::ExecuteL(
CESMRGlobalNote::EESMRUnableToEdit );
retValue = ETrue;