equal
deleted
inserted
replaced
80 // --------------------------------------------------------- |
80 // --------------------------------------------------------- |
81 // |
81 // |
82 CIMCVAppSmileIconDialog::CIMCVAppSmileIconDialog( |
82 CIMCVAppSmileIconDialog::CIMCVAppSmileIconDialog( |
83 const RPointerArray<CGulIcon>& aIconArray, |
83 const RPointerArray<CGulIcon>& aIconArray, |
84 TInt& aSelectedIconId ) |
84 TInt& aSelectedIconId ) |
85 :iIconArray( aIconArray ), iIconId( aSelectedIconId ) |
85 :iIconArray( aIconArray ), iIconId( aSelectedIconId ), iLayoutChanged(EFalse) |
86 { |
86 { |
87 |
87 |
88 } |
88 } |
89 |
89 |
90 |
90 |
139 void CIMCVAppSmileIconDialog::HandleResourceChange( TInt aType ) |
139 void CIMCVAppSmileIconDialog::HandleResourceChange( TInt aType ) |
140 { |
140 { |
141 IM_CV_LOGS(TXT("CIMCVAppSmileIconDialog::HandleResourceChange() start") ); |
141 IM_CV_LOGS(TXT("CIMCVAppSmileIconDialog::HandleResourceChange() start") ); |
142 if( aType == KEikDynamicLayoutVariantSwitch ) |
142 if( aType == KEikDynamicLayoutVariantSwitch ) |
143 { |
143 { |
144 SetLayout(); |
144 iLayoutChanged = ETrue; |
145 } |
145 SetLayout(); |
|
146 } |
146 CAknDialog::HandleResourceChange( aType ); |
147 CAknDialog::HandleResourceChange( aType ); |
147 IM_CV_LOGS(TXT("CIMCVAppSmileIconDialog::HandleResourceChange() end") ); |
148 IM_CV_LOGS(TXT("CIMCVAppSmileIconDialog::HandleResourceChange() end") ); |
148 } |
149 } |
149 |
150 |
150 // --------------------------------------------------------- |
151 // --------------------------------------------------------- |
389 { |
390 { |
390 vWidth = dialogRect.iBr.iX - dialogRect.iTl.iX - 2*aRect.iTl.iX;; |
391 vWidth = dialogRect.iBr.iX - dialogRect.iTl.iX - 2*aRect.iTl.iX;; |
391 } |
392 } |
392 else |
393 else |
393 { |
394 { |
394 vWidth = dialogRect.iBr.iX - dialogRect.iTl.iX + 2*aRect.iBr.iX; |
395 // Patch fix for mirrored layout when mode changes from portrait to |
395 } |
396 // landscape or vice versa the width calculation differs to adjust the correct width |
|
397 if (iLayoutChanged) // mode change like portrait to landscape or vice versa |
|
398 { |
|
399 vWidth = (2*aRect.iBr.iX) - (dialogRect.iBr.iX - dialogRect.iTl.iX); |
|
400 } |
|
401 else |
|
402 { |
|
403 vWidth = dialogRect.iBr.iX - dialogRect.iTl.iX + 2*aRect.iBr.iX; |
|
404 } |
|
405 } |
396 vArea = vWidth*vheight; |
406 vArea = vWidth*vheight; |
397 |
407 |
398 TInt iconCount = iIconArray.Count(); |
408 TInt iconCount = iIconArray.Count(); |
399 |
409 |
400 TInt areaOfIcon = iconCount * aRect.Width() * aRect.Height(); |
410 TInt areaOfIcon = iconCount * aRect.Width() * aRect.Height(); |