155 // Move the row down then it will be drawn to correct position. |
155 // Move the row down then it will be drawn to correct position. |
156 // controlIndex+1 tells the fields index. |
156 // controlIndex+1 tells the fields index. |
157 TInt movement = choiceLayoutRect.Rect().Height(); |
157 TInt movement = choiceLayoutRect.Rect().Height(); |
158 rect.Move( 0, movement * ( i - 1 ) ); |
158 rect.Move( 0, movement * ( i - 1 ) ); |
159 |
159 |
|
160 TInt leftMargin = choiceLayoutRect.Rect().iTl.iX; |
|
161 TInt rightMargin = choiceLayoutRect.Rect().iBr.iX; |
|
162 if ( AknLayoutUtils::LayoutMirrored() ) |
|
163 { |
|
164 leftMargin -= parentRect.iTl.iX; |
|
165 rightMargin -= parentRect.iTl.iX; |
|
166 } |
|
167 |
160 AknLayoutUtils::LayoutControl( |
168 AknLayoutUtils::LayoutControl( |
161 ControlItem( i - 1 ), |
169 ControlItem( i - 1 ), |
162 rect, |
170 rect, |
163 choiceLayoutRect.Color().Value(), |
171 choiceLayoutRect.Color().Value(), |
164 choiceLayoutRect.Rect().iTl.iX, |
172 leftMargin, |
165 0, |
173 0, |
166 choiceLayoutRect.Rect().iBr.iX, |
174 rightMargin, |
167 choiceLayoutRect.Rect().iBr.iY, |
175 choiceLayoutRect.Rect().iBr.iY, |
168 choiceLayoutRect.Rect().Width(), |
176 choiceLayoutRect.Rect().Width(), |
169 choiceLayoutRect.Rect().Height() ); |
177 choiceLayoutRect.Rect().Height() ); |
170 } |
178 } |
171 } |
179 } |