133 AknLayoutUtils::LayoutImage( iIcon, rect, iconLayout ); |
133 AknLayoutUtils::LayoutImage( iIcon, rect, iconLayout ); |
134 |
134 |
135 // Layouting lock icon |
135 // Layouting lock icon |
136 if( iLockIcon ) |
136 if( iLockIcon ) |
137 { |
137 { |
138 TAknWindowComponentLayout iconLayout( |
138 TAknWindowComponentLayout iconLayout( |
139 NMRLayoutManager::GetWindowComponentLayout( |
139 NMRLayoutManager::GetWindowComponentLayout( |
140 NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) ); |
140 NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) ); |
141 AknLayoutUtils::LayoutImage( iLockIcon, rect, iconLayout ); |
141 AknLayoutUtils::LayoutImage( iLockIcon, rect, iconLayout ); |
142 } |
142 } |
143 |
143 |
144 // Layouting label |
144 // Layouting label |
145 TAknLayoutText viewerLayoutText; |
145 TAknTextComponentLayout viewerLayoutText; |
|
146 |
146 if( iLockIcon ) |
147 if( iLockIcon ) |
147 { |
148 { |
148 viewerLayoutText = NMRLayoutManager::GetLayoutText( rect, |
149 viewerLayoutText = NMRLayoutManager::GetTextComponentLayout( |
149 NMRLayoutManager::EMRTextLayoutSingleRowEditorText ); |
150 NMRLayoutManager::EMRTextLayoutSingleRowEditorText ); |
150 } |
151 } |
151 else |
152 else |
152 { |
153 { |
153 viewerLayoutText = NMRLayoutManager::GetLayoutText( rect, |
154 viewerLayoutText = NMRLayoutManager::GetTextComponentLayout( |
154 NMRLayoutManager::EMRTextLayoutTextEditor ); |
155 NMRLayoutManager::EMRTextLayoutTextEditor ); |
155 } |
156 } |
156 |
157 |
157 TRect viewerRect( viewerLayoutText.TextRect() ); |
158 AknLayoutUtils::LayoutLabel( iLabel, rect, viewerLayoutText ); |
158 iLabel->SetRect( viewerRect ); |
159 TRect viewerRect( iLabel->Rect() ); |
159 // Setting font for the label also |
|
160 iLabel->SetFont( viewerLayoutText.Font() ); |
|
161 |
|
162 |
160 |
163 // Move focus rect so that it's relative to field's position. |
161 // Move focus rect so that it's relative to field's position. |
164 viewerRect.Move( -Position() ); |
162 viewerRect.Move( -Position() ); |
165 SetFocusRect( viewerRect ); |
163 SetFocusRect( viewerRect ); |
166 } |
164 } |
243 // --------------------------------------------------------------------------- |
241 // --------------------------------------------------------------------------- |
244 // |
242 // |
245 TBool CESMRViewerAllDayEventField::ExecuteGenericCommandL( TInt aCommand ) |
243 TBool CESMRViewerAllDayEventField::ExecuteGenericCommandL( TInt aCommand ) |
246 { |
244 { |
247 FUNC_LOG; |
245 FUNC_LOG; |
248 |
246 |
249 TBool retValue( EFalse ); |
247 TBool retValue( EFalse ); |
250 |
248 |
251 if( (aCommand == EAknCmdOpen) && IsLocked() ) |
249 if( (aCommand == EAknCmdOpen) && IsLocked() ) |
252 { |
250 { |
253 HandleTactileFeedbackL(); |
251 HandleTactileFeedbackL(); |
254 |
252 |
255 CESMRGlobalNote::ExecuteL( |
253 CESMRGlobalNote::ExecuteL( |
256 CESMRGlobalNote::EESMRUnableToEdit ); |
254 CESMRGlobalNote::EESMRUnableToEdit ); |
257 retValue = ETrue; |
255 retValue = ETrue; |
258 } |
256 } |
259 |
257 |
260 return retValue; |
258 return retValue; |
261 } |
259 } |
262 |
260 |
263 // EOF |
261 // EOF |