172 // From CCoeControl, called when the control's size changes, handles portrait-landscape switch |
172 // From CCoeControl, called when the control's size changes, handles portrait-landscape switch |
173 // --------------------------------------------------------------------------- |
173 // --------------------------------------------------------------------------- |
174 // |
174 // |
175 void CCCAppCommLauncherHeaderControl::SizeChanged() |
175 void CCCAppCommLauncherHeaderControl::SizeChanged() |
176 { |
176 { |
177 // No variation anymore in layout for portrait/landscape/statusbutton/ |
177 const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; |
178 // no statusbutton (iStatusButtonVisibility) combinations (options 0,1,2). |
|
179 // Always use option 0. |
|
180 //const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; |
|
181 const TRect rect(Rect()); |
178 const TRect rect(Rect()); |
182 TInt option(0); |
179 |
183 |
180 /** |
|
181 * Option0 (w button, lsc) |
|
182 * Option2 (w/o button, lsc) |
|
183 * Option0 (w button, prt) |
|
184 * Option1 (w/o button, prt) |
|
185 */ |
|
186 |
|
187 // (w/o button) |
|
188 TInt option( isLandscape ? 2 : 1 ); |
|
189 if( iStatusButtonVisibility ) |
|
190 { |
|
191 // (w button) |
|
192 if( isLandscape ) |
|
193 { |
|
194 option = 0; |
|
195 } |
|
196 else |
|
197 { |
|
198 option = 0; |
|
199 } |
|
200 } |
|
201 |
184 FavoriteIconSizeChanged(); |
202 FavoriteIconSizeChanged(); |
185 |
203 |
186 AknLayoutUtils::LayoutImage( |
204 AknLayoutUtils::LayoutImage( |
187 iImage, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g1(option)); |
205 iImage, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g1(option)); |
188 |
206 |
395 // SetContactStoreL |
413 // SetContactStoreL |
396 // --------------------------------------------------------------------------- |
414 // --------------------------------------------------------------------------- |
397 // |
415 // |
398 void CCCAppCommLauncherHeaderControl::SetContactStoreL(TCmsContactStore aContactStore) |
416 void CCCAppCommLauncherHeaderControl::SetContactStoreL(TCmsContactStore aContactStore) |
399 { |
417 { |
400 if (!iBitmap && !iMask) |
418 if (!iBitmap && !iMask && !iHasContactImage ) |
401 { |
419 { |
402 switch (aContactStore) |
420 switch (aContactStore) |
403 { |
421 { |
404 case ECmsContactStorePbk: |
422 case ECmsContactStorePbk: |
405 AknIconUtils::CreateIconL( |
423 AknIconUtils::CreateIconL( |
696 // |
714 // |
697 void CCCAppCommLauncherHeaderControl::FavoriteIconSizeChanged() |
715 void CCCAppCommLauncherHeaderControl::FavoriteIconSizeChanged() |
698 { |
716 { |
699 //Set the size for the Favorite Icon |
717 //Set the size for the Favorite Icon |
700 //This code must be in Sync with SizeChanged() code |
718 //This code must be in Sync with SizeChanged() code |
701 |
719 const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; |
702 // No variation anymore in layout for portrait/landscape/statusbutton/ |
|
703 // no statusbutton (iStatusButtonVisibility) combinations (options 0,1,2). |
|
704 // Always use option 0. |
|
705 //const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; |
|
706 const TRect rect(Rect()); |
720 const TRect rect(Rect()); |
707 TInt option( 0 ); |
721 |
|
722 // (w/o button) |
|
723 TInt option( isLandscape ? 2 : 1 ); |
|
724 if( iStatusButtonVisibility ) |
|
725 { |
|
726 // (w button) |
|
727 if( isLandscape ) |
|
728 { |
|
729 option = 0; |
|
730 } |
|
731 else |
|
732 { |
|
733 option = 0; |
|
734 } |
|
735 } |
|
736 |
708 AknLayoutUtils::LayoutImage( |
737 AknLayoutUtils::LayoutImage( |
709 iFavContactIcon, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g2(option)); |
738 iFavContactIcon, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g2(option)); |
710 |
739 |
711 } |
740 } |
712 |
741 |