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 const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; |
177 // No variation anymore in layout for portrait/landscape/statusbutton/ |
|
178 // no statusbutton (iStatusButtonVisibility) combinations (options 0,1,2). |
|
179 // Always use option 0. |
|
180 //const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; |
178 const TRect rect(Rect()); |
181 const TRect rect(Rect()); |
179 |
182 TInt option(0); |
180 /** |
183 |
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 |
|
202 FavoriteIconSizeChanged(); |
184 FavoriteIconSizeChanged(); |
203 |
185 |
204 AknLayoutUtils::LayoutImage( |
186 AknLayoutUtils::LayoutImage( |
205 iImage, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g1(option)); |
187 iImage, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g1(option)); |
206 |
188 |
707 // |
689 // |
708 void CCCAppCommLauncherHeaderControl::FavoriteIconSizeChanged() |
690 void CCCAppCommLauncherHeaderControl::FavoriteIconSizeChanged() |
709 { |
691 { |
710 //Set the size for the Favorite Icon |
692 //Set the size for the Favorite Icon |
711 //This code must be in Sync with SizeChanged() code |
693 //This code must be in Sync with SizeChanged() code |
712 const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; |
694 |
|
695 // No variation anymore in layout for portrait/landscape/statusbutton/ |
|
696 // no statusbutton (iStatusButtonVisibility) combinations (options 0,1,2). |
|
697 // Always use option 0. |
|
698 //const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0; |
713 const TRect rect(Rect()); |
699 const TRect rect(Rect()); |
714 |
700 TInt option( 0 ); |
715 // (w/o button) |
|
716 TInt option( isLandscape ? 2 : 1 ); |
|
717 if( iStatusButtonVisibility ) |
|
718 { |
|
719 // (w button) |
|
720 if( isLandscape ) |
|
721 { |
|
722 option = 0; |
|
723 } |
|
724 else |
|
725 { |
|
726 option = 0; |
|
727 } |
|
728 } |
|
729 |
|
730 AknLayoutUtils::LayoutImage( |
701 AknLayoutUtils::LayoutImage( |
731 iFavContactIcon, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g2(option)); |
702 iFavContactIcon, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g2(option)); |
732 |
703 |
733 } |
704 } |
734 |
705 |