166 AknLayoutUtils::LayoutImage( iIcon, rect, iconLayout ); |
166 AknLayoutUtils::LayoutImage( iIcon, rect, iconLayout ); |
167 |
167 |
168 // Layouting lock icon |
168 // Layouting lock icon |
169 if( iLockIcon ) |
169 if( iLockIcon ) |
170 { |
170 { |
171 TAknWindowComponentLayout iconLayout( |
171 TAknWindowComponentLayout iconLayout( |
172 NMRLayoutManager::GetWindowComponentLayout( |
172 NMRLayoutManager::GetWindowComponentLayout( |
173 NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) ); |
173 NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) ); |
174 AknLayoutUtils::LayoutImage( iLockIcon, rect, iconLayout ); |
174 AknLayoutUtils::LayoutImage( iLockIcon, rect, iconLayout ); |
175 } |
175 } |
176 |
176 |
177 // Layouting label |
177 // Layouting label |
178 TAknLayoutText viewerLayoutText; |
178 TAknTextComponentLayout viewerLayoutText; |
179 if( iLockIcon ) |
179 if( iLockIcon ) |
180 { |
180 { |
181 viewerLayoutText = NMRLayoutManager::GetLayoutText( rect, |
181 viewerLayoutText = NMRLayoutManager::GetTextComponentLayout( |
182 NMRLayoutManager::EMRTextLayoutSingleRowEditorText ); |
182 NMRLayoutManager::EMRTextLayoutSingleRowEditorText ); |
183 } |
183 } |
184 else |
184 else |
185 { |
185 { |
186 viewerLayoutText = NMRLayoutManager::GetLayoutText( rect, |
186 viewerLayoutText = NMRLayoutManager::GetTextComponentLayout( |
187 NMRLayoutManager::EMRTextLayoutTextEditor ); |
187 NMRLayoutManager::EMRTextLayoutTextEditor ); |
188 } |
188 } |
189 |
189 |
190 TRect viewerRect( viewerLayoutText.TextRect() ); |
190 AknLayoutUtils::LayoutLabel( iLabel, rect, viewerLayoutText ); |
191 iLabel->SetRect( viewerRect ); |
191 TRect viewerRect( iLabel->Rect() ); |
192 |
192 |
193 // Move focus rect so that it's relative to field's position. |
193 // Move focus rect so that it's relative to field's position. |
194 viewerRect.Move( -Position() ); |
194 viewerRect.Move( -Position() ); |
195 SetFocusRect( viewerRect ); |
195 SetFocusRect( viewerRect ); |
196 |
|
197 // Setting font also for the label |
|
198 iLabel->SetFont( viewerLayoutText.Font() ); |
|
199 } |
196 } |
200 |
197 |
201 // --------------------------------------------------------------------------- |
198 // --------------------------------------------------------------------------- |
202 // CESMRViewerSyncField::CountComponentControls() |
199 // CESMRViewerSyncField::CountComponentControls() |
203 // --------------------------------------------------------------------------- |
200 // --------------------------------------------------------------------------- |