200 AknLayoutUtils::LayoutImage( iIcon, rect, iconLayout ); |
200 AknLayoutUtils::LayoutImage( iIcon, rect, iconLayout ); |
201 |
201 |
202 // Layouting lock icon |
202 // Layouting lock icon |
203 if( iLockIcon ) |
203 if( iLockIcon ) |
204 { |
204 { |
205 TAknWindowComponentLayout iconLayout( |
205 TAknWindowComponentLayout iconLayout( |
206 NMRLayoutManager::GetWindowComponentLayout( |
206 NMRLayoutManager::GetWindowComponentLayout( |
207 NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) ); |
207 NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) ); |
208 AknLayoutUtils::LayoutImage( iLockIcon, rect, iconLayout ); |
208 AknLayoutUtils::LayoutImage( iLockIcon, rect, iconLayout ); |
209 } |
209 } |
210 |
210 |
211 // Layouting label |
211 // Layouting label |
212 TAknLayoutText viewerLayoutText; |
212 TAknTextComponentLayout viewerLayoutText; |
213 if( iLockIcon ) |
213 if( iLockIcon ) |
214 { |
214 { |
215 viewerLayoutText = NMRLayoutManager::GetLayoutText( rect, |
215 viewerLayoutText = NMRLayoutManager::GetTextComponentLayout( |
216 NMRLayoutManager::EMRTextLayoutSingleRowEditorText ); |
216 NMRLayoutManager::EMRTextLayoutSingleRowEditorText ); |
217 } |
217 } |
218 else |
218 else |
219 { |
219 { |
220 viewerLayoutText = NMRLayoutManager::GetLayoutText( rect, |
220 viewerLayoutText = NMRLayoutManager::GetTextComponentLayout( |
221 NMRLayoutManager::EMRTextLayoutTextEditor ); |
221 NMRLayoutManager::EMRTextLayoutTextEditor ); |
222 } |
222 } |
223 |
223 |
224 TRect viewerRect( viewerLayoutText.TextRect() ); |
224 AknLayoutUtils::LayoutLabel( iLabel, rect, viewerLayoutText ); |
225 iLabel->SetRect( viewerRect ); |
225 TRect viewerRect( iLabel->Rect() ); |
226 |
226 |
227 // Move focus rect so that it's relative to field's position. |
227 // Move focus rect so that it's relative to field's position. |
228 viewerRect.Move( -Position() ); |
228 viewerRect.Move( -Position() ); |
229 SetFocusRect( viewerRect ); |
229 SetFocusRect( viewerRect ); |
230 |
|
231 // Setting font also for the label |
|
232 iLabel->SetFont( viewerLayoutText.Font() ); |
|
233 } |
230 } |
234 |
231 |
235 // ----------------------------------------------------------------------------- |
232 // ----------------------------------------------------------------------------- |
236 // CESMRViewerRecurrenceField::CountComponentControls() |
233 // CESMRViewerRecurrenceField::CountComponentControls() |
237 // ----------------------------------------------------------------------------- |
234 // ----------------------------------------------------------------------------- |