597 iAppUi.LayoutHandler()->DropDownMenuListPadding() ); |
597 iAppUi.LayoutHandler()->DropDownMenuListPadding() ); |
598 const TAlfMetric paddingMetric( paddingValue ); |
598 const TAlfMetric paddingMetric( paddingValue ); |
599 iParentLayout->SetPadding( paddingMetric ); |
599 iParentLayout->SetPadding( paddingMetric ); |
600 |
600 |
601 // Set list background |
601 // Set list background |
602 if ( !iBackgroundBrush ) |
602 TRect outerRect( iScreenRect ); |
603 { |
603 outerRect.Shrink( paddingValue, paddingValue ); |
604 iBackgroundBrush = |
604 if ( !iBackgroundBrush ) |
605 CAlfFrameBrush::NewL( iEnv, KAknsIIDQsnFrPopup, 1, 1 ); |
605 { |
606 TRect outerRect( iScreenRect ); |
606 iBackgroundBrush = CAlfFrameBrush::NewL( iEnv, KAknsIIDQsnFrPopup, 1, 1 ); |
607 outerRect.Shrink( paddingValue, paddingValue ); |
|
608 iBackgroundBrush->SetFrameRectsL( outerRect, iScreenRect ); |
607 iBackgroundBrush->SetFrameRectsL( outerRect, iScreenRect ); |
609 iParentLayout->Brushes()->AppendL( iBackgroundBrush, EAlfDoesNotHaveOwnership ); |
608 iParentLayout->Brushes()->InsertL( 0, iBackgroundBrush, EAlfDoesNotHaveOwnership ); |
610 } |
609 } |
|
610 else |
|
611 { |
|
612 // this prevents transparent popuplist background in portrait layout |
|
613 // when sw keyboard in landscape layout was called between popups |
|
614 iBackgroundBrush->SetFrameRectsL( outerRect, iScreenRect ); |
|
615 } |
611 |
616 |
612 if( !iShadowBrush ) |
617 if( !iShadowBrush ) |
613 { |
618 { |
614 iShadowBrush = CAlfShadowBorderBrush::NewL( |
619 iShadowBrush = CAlfShadowBorderBrush::NewL( |
615 iEnv, TAlfMetric( KDefaultShadowBorderWidth ) ); |
620 iEnv, TAlfMetric( KDefaultShadowBorderWidth ) ); |
618 iParentLayout->Brushes()->AppendL( iShadowBrush, |
623 iParentLayout->Brushes()->AppendL( iShadowBrush, |
619 EAlfDoesNotHaveOwnership ); |
624 EAlfDoesNotHaveOwnership ); |
620 } |
625 } |
621 |
626 |
622 // Append brush if it's not yet appended. |
627 // Append brush if it's not yet appended. |
623 if ( iParentLayout->Brushes()->Count() == 0 ) |
628 switch ( iParentLayout->Brushes()->Count() ) |
624 { |
629 { |
625 // Keep the ownership of the brush to avoid unneeded object deletion / reconstruction |
630 case 0 : |
626 iParentLayout->Brushes()->InsertL( 0, iBackgroundBrush, EAlfDoesNotHaveOwnership ); |
631 // Keep the ownership of the brush to avoid unneeded object deletion / reconstruction |
627 iParentLayout->Brushes()->AppendL( iShadowBrush, EAlfDoesNotHaveOwnership ); |
632 iParentLayout->Brushes()->InsertL( 0, iBackgroundBrush, EAlfDoesNotHaveOwnership ); |
628 } |
633 iParentLayout->Brushes()->AppendL( iShadowBrush, EAlfDoesNotHaveOwnership ); |
|
634 break; |
|
635 case 1 : |
|
636 if ( static_cast<CAlfBrush *>(iBackgroundBrush) == & ( iParentLayout->Brushes()->At(0)) ) |
|
637 { |
|
638 iParentLayout->Brushes()->AppendL( iShadowBrush, EAlfDoesNotHaveOwnership ); |
|
639 } |
|
640 else |
|
641 { |
|
642 iParentLayout->Brushes()->InsertL( 0, iBackgroundBrush, EAlfDoesNotHaveOwnership ); |
|
643 } |
|
644 break; |
|
645 default: // 2: it's ok no need to add brush |
|
646 break; |
|
647 } // switch |
629 |
648 |
630 SetPopupSoftkeysL(); |
649 SetPopupSoftkeysL(); |
631 // SetRect need to be called also here, otherwise the list layout might |
650 // SetRect need to be called also here, otherwise the list layout might |
632 // be wrong in mirrored layout |
651 // be wrong in mirrored layout |
633 iParentLayout->SetRect( iCtrlButtonRect ); |
652 iParentLayout->SetRect( iCtrlButtonRect ); |
1157 if ( FeatureManager::FeatureSupported( KFeatureIdFfCmailIntegration ) ) |
1176 if ( FeatureManager::FeatureSupported( KFeatureIdFfCmailIntegration ) ) |
1158 { |
1177 { |
1159 // remove help support in pf5250 |
1178 // remove help support in pf5250 |
1160 aMenuPane->SetItemDimmed( EFsEmailUiCmdHelp, ETrue); |
1179 aMenuPane->SetItemDimmed( EFsEmailUiCmdHelp, ETrue); |
1161 } |
1180 } |
1162 |
|
1163 // select option |
|
1164 aMenuPane->SetItemDimmed( EFsEmailUiCmdSelect, iModel->Count() == 0 ); |
|
1165 |
|
1166 } |
1181 } |
1167 |
1182 |
1168 // Add shortcut hints |
1183 // Add shortcut hints |
1169 iAppUi.ShortcutBinding().AppendShortcutHintsL( *aMenuPane, |
1184 iAppUi.ShortcutBinding().AppendShortcutHintsL( *aMenuPane, |
1170 CFSEmailUiShortcutBinding::EContextFolderList ); |
1185 CFSEmailUiShortcutBinding::EContextFolderList ); |
2700 iIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( EFolderListServerFoldersTexturePopup ) ); // EFolderListIconServerFolders |
2714 iIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( EFolderListServerFoldersTexturePopup ) ); // EFolderListIconServerFolders |
2701 iIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( EFolderListMoreFoldersTexturePopup ) ); // EFolderListIconMoreFolders |
2715 iIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( EFolderListMoreFoldersTexturePopup ) ); // EFolderListIconMoreFolders |
2702 iIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( EFolderListEmailAccountTexturePopup ) ); // EFolderListIconEmailAccount |
2716 iIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( EFolderListEmailAccountTexturePopup ) ); // EFolderListIconEmailAccount |
2703 |
2717 |
2704 // NOTE: Must be appended same order as are in TFsEmailUiSortListIcons! |
2718 // NOTE: Must be appended same order as are in TFsEmailUiSortListIcons! |
2705 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListAttachmentAscTexture ) ); // ESortListAttachmentAscIcon |
2719 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListAttachmentAscTexturePopup ) ); // ESortListAttachmentAscIcon |
2706 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListAttachmentDescTexture ) ); // ESortListAttachmentDescIcon |
2720 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListAttachmentDescTexturePopup ) ); // ESortListAttachmentDescIcon |
2707 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListDateAscTexture ) ); // ESortListDateAscIcon |
2721 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListDateAscTexturePopup ) ); // ESortListDateAscIcon |
2708 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListDateDescTexture ) ); // ESortListDateDescIcon |
2722 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListDateDescTexturePopup ) ); // ESortListDateDescIcon |
2709 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListFollowAscTexture ) ); // ESortListFollowAscIcon |
2723 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListFollowAscTexturePopup ) ); // ESortListFollowAscIcon |
2710 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListFollowDescTexture ) ); // ESortListFollowDescIcon |
2724 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListFollowDescTexturePopup ) ); // ESortListFollowDescIcon |
2711 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListPriorityAscTexture ) ); // ESortListPriorityAscIcon |
2725 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListPriorityAscTexturePopup ) ); // ESortListPriorityAscIcon |
2712 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListPriorityDescTexture ) ); // ESortListPriorityDescIcon |
2726 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListPriorityDescTexturePopup ) ); // ESortListPriorityDescIcon |
2713 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListSenderAscTexture ) ); // ESortListSenderAscIcon |
2727 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListSenderAscTexturePopup ) ); // ESortListSenderAscIcon |
2714 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListSenderDescTexture ) ); // ESortListSenderDescIcon |
2728 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListSenderDescTexturePopup ) ); // ESortListSenderDescIcon |
2715 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListSubjectAscTexture ) ); // ESortListSubjectAscIcon |
2729 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListSubjectAscTexturePopup ) ); // ESortListSubjectAscIcon |
2716 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListSubjectDescTexture ) ); // ESortListSubjectDescIcon |
2730 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListSubjectDescTexturePopup ) ); // ESortListSubjectDescIcon |
2717 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListUnreadAscTexture ) ); // ESortListUnreadAscIcon |
2731 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListUnreadAscTexturePopup ) ); // ESortListUnreadAscIcon |
2718 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListUnreadDescTexture ) ); // ESortListUnreadDescIcon |
2732 iSortIconArray.AppendL( &iAppUi.FsTextureManager()->TextureByIndex( ESortListUnreadDescTexturePopup ) ); // ESortListUnreadDescIcon |
2719 } |
2733 } |
2720 } |
2734 } |
2721 |
2735 |
2722 void CFSEmailUiFolderListVisualiser::ResizeListIcons() |
2736 void CFSEmailUiFolderListVisualiser::ResizeListIcons() |
2723 { |
2737 { |