uifw/AvKon/src/aknlists.cpp
branchRCL_3
changeset 56 d48ab3b357f1
parent 55 aecbbf00d063
child 57 be7054131a1e
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
     1 /*
     1 /*
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   614 
   614 
   615     aItemDrawer->SetHighlightedTextColor(color);
   615     aItemDrawer->SetHighlightedTextColor(color);
   616     aItemDrawer->SetHighlightedBackColor(AKN_LAF_COLOR_STATIC(
   616     aItemDrawer->SetHighlightedBackColor(AKN_LAF_COLOR_STATIC(
   617         AKN_LAYOUT_WINDOW_List_pane_highlight_graphics__various__Line_2(TRect(0,0,0,0)).iC));
   617         AKN_LAYOUT_WINDOW_List_pane_highlight_graphics__various__Line_2(TRect(0,0,0,0)).iC));
   618     }
   618     }
   619     
   619 
   620 TInt AknListBoxLayouts::AdjustPopupLayoutData( const TRect& aScreenRect )
   620 
   621     {
       
   622     _AKNTRACE( "[%s][%s][%d].", "AknListBoxLayouts", __FUNCTION__, __LINE__ );
       
   623     TInt width = aScreenRect.Width();
       
   624     TInt height = aScreenRect.Height();
       
   625     
       
   626     if (  width ==640 &&  height ==360 ) //QHD
       
   627         {
       
   628         return 32;
       
   629         }
       
   630     else if(( width ==320 && height ==240 ) //QVGA, QVGA2
       
   631             ||( width ==640 && height ==480 )) //VGA, VAG3
       
   632         {
       
   633         return 0;
       
   634         }
       
   635     else
       
   636         {
       
   637         Panic( EAknPopupLayoutUnknownResolution );
       
   638         return 0;
       
   639         }
       
   640     }
       
   641 // -----------------------------------------------------------------------------
   621 // -----------------------------------------------------------------------------
   642 // IdFromTextAlign
   622 // IdFromTextAlign
   643 // -----------------------------------------------------------------------------
   623 // -----------------------------------------------------------------------------
   644 //
   624 //
   645 static TInt IdFromTextAlign( const CGraphicsContext::TTextAlign aAlign )
   625 static TInt IdFromTextAlign( const CGraphicsContext::TTextAlign aAlign )
  1167                  TPoint p2)
  1147                  TPoint p2)
  1168     {
  1148     {
  1169     SetupFormTextCell( aListBox, aItemDrawer, index, font, C, lm, rm, B, W, aAlign, p1, p2 );
  1149     SetupFormTextCell( aListBox, aItemDrawer, index, font, C, lm, rm, B, W, aAlign, p1, p2 );
  1170     }
  1150     }
  1171 
  1151 
  1172 // this is common popuplist setup code
  1152 // ----------------------------------------------------------------------------
  1173 static TSize PopupListItemSize(const TAknWindowLineLayout &aL)
  1153 // This is common popup list setup code.
       
  1154 // ----------------------------------------------------------------------------
       
  1155 //
       
  1156 static TSize PopupListItemSize( const TAknWindowLineLayout &aL )
  1174     {
  1157     {
  1175     _AKNTRACE( "[%s][%d]", __FUNCTION__, __LINE__ );
  1158     _AKNTRACE( "[%s][%d]", __FUNCTION__, __LINE__ );
  1176     TAknLayoutRect temp, layout;
  1159     TAknLayoutRect temp;
       
  1160     TAknLayoutRect layout;
  1177     TRect mainPane;
  1161     TRect mainPane;
  1178     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EPopupParent, mainPane );
  1162     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EPopupParent, mainPane );
  1179 
  1163 
  1180     temp.LayoutRect( mainPane, AknLayoutScalable_Avkon::popup_menu_window(13));
  1164     temp.LayoutRect( mainPane,
       
  1165                      AknLayoutScalable_Avkon::popup_menu_window(
       
  1166                          Layout_Meta_Data::IsLandscapeOrientation() ? 43 : 13 ) );
  1181     
  1167     
  1182     TRect screenRect;
  1168     TRect screenRect;
  1183     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect ); 
  1169     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect ); 
  1184     TAknWindowLineLayout lineLayout = AknLayoutScalable_Avkon::listscroll_menu_pane(0).LayoutLine();
  1170 
  1185     
  1171     layout.LayoutRect( temp.Rect(),
  1186     // Layout data of listscroll_menu_pane are changed for CR 417-35260.
  1172                        AknLayoutScalable_Avkon::listscroll_menu_pane( 0 ) );
  1187     // The change is just for QHD landscape model.
       
  1188     // The CR makes listscroll_menu_pane's ir or il bigger than normal,
       
  1189     // so that width of list item is smaller than needs. Then, first cell 
       
  1190     // of list item can not be drawn on proper position.
       
  1191     // Adjustment of layout is a solution for this problem. This is not a perfect idea, but
       
  1192     // creating a new layout for popuplist is too complex to do that. Adjustment is a must.
       
  1193     if(Layout_Meta_Data::IsLandscapeOrientation())       
       
  1194         {
       
  1195         TInt offset  = AknListBoxLayouts::AdjustPopupLayoutData( screenRect );
       
  1196         if (!AknLayoutUtils::LayoutMirrored())
       
  1197             {
       
  1198             lineLayout.ir -= offset;
       
  1199             }
       
  1200         else
       
  1201             {
       
  1202             lineLayout.il -= offset;
       
  1203             }
       
  1204         }
       
  1205     layout.LayoutRect( temp.Rect(), lineLayout);
       
  1206    
  1173    
  1207     temp.LayoutRect( layout.Rect(), AknLayoutScalable_Avkon::list_menu_pane(0));
  1174     temp.LayoutRect( layout.Rect(),
  1208     layout.LayoutRect( temp.Rect(), aL);
  1175                      AknLayoutScalable_Avkon::list_menu_pane( 0 ) );
       
  1176     layout.LayoutRect( temp.Rect(), aL );
  1209 
  1177 
  1210     return layout.Rect().Size();
  1178     return layout.Rect().Size();
  1211     }
  1179     }
  1212 
  1180 
  1213 static void SetupCommonPopupListL(CEikFormattedCellListBox* aListBox, const TAknWindowLineLayout &aLayout )
  1181 static void SetupCommonPopupListL(CEikFormattedCellListBox* aListBox, const TAknWindowLineLayout &aLayout )
  1422     {
  1390     {
  1423     SetupStretchableListL( aListBox, aNormalLayout, aNormalLayout );
  1391     SetupStretchableListL( aListBox, aNormalLayout, aNormalLayout );
  1424     }
  1392     }
  1425 
  1393 
  1426 // -----------------------------------------------------------------------------
  1394 // -----------------------------------------------------------------------------
       
  1395 // SetupListL
       
  1396 // -----------------------------------------------------------------------------
       
  1397 //
       
  1398 static void SetupListL( CEikFormattedCellListBox* aListBox,
       
  1399                         const TAknWindowComponentLayout& aNormalLayout )
       
  1400     {
       
  1401     SetupStretchableListL( aListBox, aNormalLayout, aNormalLayout );
       
  1402     }
       
  1403 
       
  1404 // -----------------------------------------------------------------------------
  1427 // ShowAllRows
  1405 // ShowAllRows
  1428 // -----------------------------------------------------------------------------
  1406 // -----------------------------------------------------------------------------
  1429 //
  1407 //
  1430 #ifdef RD_LIST_STRETCH
  1408 #ifdef RD_LIST_STRETCH
  1431 static TBool ShowAllRows( CFormattedCellListBoxData* aData )
  1409 static TBool ShowAllRows( CFormattedCellListBoxData* aData )
  1632 
  1610 
  1633     TPtrC repl;
  1611     TPtrC repl;
  1634     TInt pos = -1;
  1612     TInt pos = -1;
  1635 
  1613 
  1636     TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse());
  1614     TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse());
       
  1615     
       
  1616     if ( Flags() & CListItemDrawer::EMarkingModeEnabled )
       
  1617         {
       
  1618         removeicon = EFalse;
       
  1619         }
       
  1620 
  1637     if ( Flags() & EDrawMarkSelection && ItemMarkPosition() != -1 && removeicon)
  1621     if ( Flags() & EDrawMarkSelection && ItemMarkPosition() != -1 && removeicon)
  1638         {
  1622         {
  1639         repl.Set( ItemMarkReplacement() );
  1623         repl.Set( ItemMarkReplacement() );
  1640         pos = ItemMarkPosition();
  1624         pos = ItemMarkPosition();
  1641         } 
  1625         } 
  1724 #endif // RD_LIST_STRETCH    
  1708 #endif // RD_LIST_STRETCH    
  1725 
  1709 
  1726     // Set again because ReplaceColumn in WordWrapListItem does not update the length to 'des2' !
  1710     // Set again because ReplaceColumn in WordWrapListItem does not update the length to 'des2' !
  1727     des2.Set( buffer2->Des() );
  1711     des2.Set( buffer2->Des() );
  1728 
  1712 
  1729     DrawBackgroundAndSeparatorLines( aItemTextRect );
  1713     DrawBackgroundAndSeparatorLines( aItemTextRect, 
       
  1714             aItemIndex != FormattedCellData()->ListBox()->BottomItemIndex() );
  1730 
  1715 
  1731     if( aItemIsCurrent )
  1716     if( aItemIsCurrent )
  1732         {
  1717         {
  1733         FormattedCellData()->SetCurrentItemIndex(aItemIndex); // fonts for java
  1718         FormattedCellData()->SetCurrentItemIndex(aItemIndex); // fonts for java
  1734         }
  1719         }
  3116             if ( transApi )
  3101             if ( transApi )
  3117                 {
  3102                 {
  3118                 transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
  3103                 transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
  3119                 }
  3104                 }
  3120 #endif //RD_UI_TRANSITION_EFFECTS_LIST
  3105 #endif //RD_UI_TRANSITION_EFFECTS_LIST
  3121             gc->SetBrushColor(this->BackColor());
  3106 
  3122             AknsDrawUtils::BackgroundBetweenRects( AknsUtils::SkinInstance(), cc, this, *gc, clientRect, this->iView->ViewRect() );
  3107             if ( this->iItemDrawer->Flags() 
       
  3108                     & CListItemDrawer::EDrawWholeBackground )
       
  3109                 {
       
  3110                 AknsDrawUtils::Background( 
       
  3111                     AknsUtils::SkinInstance(), cc, this, *gc, clientRect );
       
  3112                 
       
  3113                 this->iItemDrawer->SetFlags( CListItemDrawer::EBackgroundDrawn );
       
  3114                 }
       
  3115             else
       
  3116                 {
       
  3117                 gc->SetBrushColor(this->BackColor());
       
  3118                 AknsDrawUtils::BackgroundBetweenRects( 
       
  3119                         AknsUtils::SkinInstance(), cc, this, *gc, clientRect, 
       
  3120                         this->iView->ViewRect() );
       
  3121                 }
       
  3122 
  3123 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  3123 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  3124             if ( transApi )
  3124             if ( transApi )
  3125                 {
  3125                 {
  3126                 transApi->StopDrawing();
  3126                 transApi->StopDrawing();
  3127         }
  3127         }
  3390             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g1( 0 ) );
  3390             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g1( 0 ) );
  3391 
  3391 
  3392         formattedCellData->SetStretchableTextSubCellL(
  3392         formattedCellData->SetStretchableTextSubCellL(
  3393             1,
  3393             1,
  3394             AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 0 ),
  3394             AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 0 ),
  3395             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_t1( 0 ) );
  3395             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_t1( 3 ) );
  3396 
  3396 
  3397         formattedCellData->SetStretchableTextSubCellL(
  3397         formattedCellData->SetStretchableTextSubCellL(
  3398             2,
  3398             2,
  3399             AknLayoutScalable_Avkon::list_double_graphic_pane_t2( 0 ),
  3399             AknLayoutScalable_Avkon::list_double_graphic_pane_t2( 0 ),
  3400             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_t2( 0 ) );
  3400             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_t2( 3 ) );
  3401             
  3401             
  3402         formattedCellData->SetStretchableGraphicSubCellL(
  3402         formattedCellData->SetStretchableGraphicSubCellL(
  3403             3,
  3403             3,
  3404             AknLayoutScalable_Avkon::list_double_graphic_pane_g3( 0 ),
  3404             AknLayoutScalable_Avkon::list_double_graphic_pane_g3( 0 ),
  3405             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g3( 0 ) );
  3405             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g3( 0 ) );
  3408             4,
  3408             4,
  3409             AknLayoutScalable_Avkon::list_double_graphic_pane_g2( 1 ),
  3409             AknLayoutScalable_Avkon::list_double_graphic_pane_g2( 1 ),
  3410             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g2( 1 ) );
  3410             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g2( 1 ) );
  3411 
  3411 
  3412         // New icon below g1. 
  3412         // New icon below g1. 
  3413         formattedCellData->SetGraphicSubCellL(
  3413         formattedCellData->SetStretchableGraphicSubCellL(
  3414             5,
  3414             5,
  3415             AknLayoutScalable_Avkon::list_double_graphic_pane_g4( 0 ) );
  3415             AknLayoutScalable_Avkon::list_double_graphic_pane_g4( 0 ) ,
       
  3416             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g4( 0 ) );
       
  3417             
  3416 
  3418 
  3417         // On default new cell is always drawn but this cell should NOT be drawn!
  3419         // On default new cell is always drawn but this cell should NOT be drawn!
  3418         formattedCellData->SetNotAlwaysDrawnSubCellL( 5, ETrue );
  3420         formattedCellData->SetNotAlwaysDrawnSubCellL( 5, ETrue );
  3419             
  3421             
  3420         // Conditional subcells must be added in priority order!
  3422         // Conditional subcells must be added in priority order!
  3421         formattedCellData->SetStretchableConditionalSubCellL(
  3423         formattedCellData->SetStretchableConditionalSubCellL(
  3422             4,
  3424             4,
  3423             AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 2 ),
  3425             AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 2 ),
  3424             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_t2( 2 ), 1, 2 );
  3426             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_t2( 4 ), 1, 2 );
  3425 
  3427 
  3426         formattedCellData->SetStretchableConditionalSubCellL(
  3428         formattedCellData->SetStretchableConditionalSubCellL(
  3427             3,
  3429             3,
  3428             AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 1 ),
  3430             AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 1 ),
  3429             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_t2( 1 ), 1, 2 );
  3431             AknLayoutScalable_Avkon::list_double_graphic_pane_vc_t2( 5 ), 1, 2 );
  3430         }
  3432         }
  3431     else
  3433     else
  3432         {
  3434         {
  3433         formattedCellData->SetStretchableGraphicSubCellL(
  3435         formattedCellData->SetStretchableGraphicSubCellL(
  3434             0,
  3436             0,
  3450         }
  3452         }
  3451     else
  3453     else
  3452         {
  3454         {
  3453         itemDrawer->SetItemMarkPosition( 3 );
  3455         itemDrawer->SetItemMarkPosition( 3 );
  3454         itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement );
  3456         itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement );
       
  3457         }
       
  3458 
       
  3459     // Mirrored layout does not have smiley.
       
  3460     if ( !AknLayoutUtils::LayoutMirrored() && 
       
  3461          itemDrawer->Flags() & CListItemDrawer::EDrawSmileyIcon )
       
  3462         {
       
  3463         formattedCellData->InitSmileyL();
       
  3464         // only second lable can have smiley icon now. 
       
  3465         formattedCellData->SetSmileySubCellL(2);
  3455         }
  3466         }
  3456     _AKNTRACE_FUNC_EXIT;
  3467     _AKNTRACE_FUNC_EXIT;
  3457     }
  3468     }
  3458 
  3469 
  3459 // -----------------------------------------------------------------------------
  3470 // -----------------------------------------------------------------------------
  3479     _AKNTRACE_FUNC_ENTER;
  3490     _AKNTRACE_FUNC_ENTER;
  3480     CFormattedCellListBoxItemDrawer *itemDrawer( ItemDrawer() );
  3491     CFormattedCellListBoxItemDrawer *itemDrawer( ItemDrawer() );
  3481     CFormattedCellListBoxData* formattedCellData( itemDrawer->FormattedCellData() );
  3492     CFormattedCellListBoxData* formattedCellData( itemDrawer->FormattedCellData() );
  3482     if ( !formattedCellData->SecondRowHidden() )
  3493     if ( !formattedCellData->SecondRowHidden() )
  3483         {
  3494         {
  3484         SetupStretchableListL( this,
  3495         SetupListL( this, AknLayoutScalable_Avkon::list_double_pane( 0 ) );
  3485                               AknLayoutScalable_Avkon::list_double_pane( 0 ),
       
  3486                               AknLayoutScalable_Avkon::list_double_pane_vc( 0 ) );
       
  3487         }
  3496         }
  3488     else
  3497     else
  3489         {
  3498         {
  3490         SetupStretchableListL( this,
  3499         SetupListL( this, AknLayoutScalable_Avkon::list_single_pane( 0 ) );
  3491                               AknLayoutScalable_Avkon::list_single_pane( 0 ),
       
  3492                               AknLayoutScalable_Avkon::list_double_pane_vc( 0 ) );
       
  3493         }
  3500         }
  3494 
  3501 
  3495     SetSeparatorLinePosition( this, EAColumn );
  3502     SetSeparatorLinePosition( this, EAColumn );
  3496 
  3503 
  3497     if ( ShowAllRows( formattedCellData ) )
  3504     if ( ShowAllRows( formattedCellData ) )
  3498         {
  3505         {
  3499         // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if 
  3506         // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if 
  3500         // this cell does not exist.
  3507         // this cell does not exist.
  3501         formattedCellData->SetStretchableTextSubCellL( 0,
  3508         formattedCellData->SetTextSubCellL( 0,
  3502             AknLayoutScalable_Avkon::list_double_pane_t1( 0 ),
  3509             AknLayoutScalable_Avkon::list_double_pane_t1( 0 ) );
  3503             AknLayoutScalable_Avkon::list_double_pane_vc_t1( 0 ) );
  3510 
  3504 
  3511         formattedCellData->SetTextSubCellL( 1,
  3505         formattedCellData->SetStretchableTextSubCellL( 1,
  3512             AknLayoutScalable_Avkon::list_double_pane_t1( 0 ) );
  3506             AknLayoutScalable_Avkon::list_double_pane_t1( 0 ),
  3513 
  3507             AknLayoutScalable_Avkon::list_double_pane_vc_t1( 0 ) );
  3514         formattedCellData->SetTextSubCellL( 2,
  3508 
  3515             AknLayoutScalable_Avkon::list_double_pane_t2( 0 ) );
  3509         formattedCellData->SetStretchableTextSubCellL( 2,
       
  3510             AknLayoutScalable_Avkon::list_double_pane_t2( 0 ),
       
  3511             AknLayoutScalable_Avkon::list_double_pane_vc_t2( 0 ) );
       
  3512             
  3516             
  3513         formattedCellData->SetStretchableGraphicSubCellL( 3,
  3517         formattedCellData->SetGraphicSubCellL( 3,
  3514             AknLayoutScalable_Avkon::list_double_pane_g1( 0 ),
  3518             AknLayoutScalable_Avkon::list_double_pane_g1( 0 ) );
  3515             AknLayoutScalable_Avkon::list_double_pane_vc_g1( 0 ) );
  3519 
  3516 
  3520         formattedCellData->SetGraphicSubCellL( 4,
  3517         formattedCellData->SetStretchableGraphicSubCellL( 4,
  3521             AknLayoutScalable_Avkon::list_double_pane_g2( 0 ) );
  3518             AknLayoutScalable_Avkon::list_double_pane_g2( 0 ),
       
  3519             AknLayoutScalable_Avkon::list_double_pane_vc_g2( 0 ) );
       
  3520 
  3522 
  3521         // Conditional subcells must be added in priority order!
  3523         // Conditional subcells must be added in priority order!
  3522         formattedCellData->SetStretchableConditionalSubCellL( 4,
  3524         formattedCellData->SetConditionalSubCellL( 4,
  3523             AknLayoutScalable_Avkon::list_double_pane_t1( 2 ),
  3525             AknLayoutScalable_Avkon::list_double_pane_t1( 2 ), 1 );
  3524             AknLayoutScalable_Avkon::list_double_pane_vc_t2( 2 ), 1, 2 );
  3526 
  3525 
  3527         formattedCellData->SetConditionalSubCellL( 3,
  3526         formattedCellData->SetStretchableConditionalSubCellL( 3,
  3528             AknLayoutScalable_Avkon::list_double_pane_t1( 1 ), 1 );
  3527             AknLayoutScalable_Avkon::list_double_pane_t1( 1 ),
       
  3528             AknLayoutScalable_Avkon::list_double_pane_vc_t2( 1 ), 1, 2 );
       
  3529         }
  3529         }
  3530     else
  3530     else
  3531         {
  3531         {
  3532         // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if 
  3532         // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if 
  3533         // this cell does not exist.
  3533         // this cell does not exist.
  3534         formattedCellData->SetStretchableTextSubCellL( 0,
  3534         formattedCellData->SetTextSubCellL( 0,
  3535             AknLayoutScalable_Avkon::list_single_pane_t1( 0 ),
  3535             AknLayoutScalable_Avkon::list_single_pane_t1( 0 ) );
  3536             AknLayoutScalable_Avkon::list_double_pane_vc_t1( 0 ) );
  3536 
  3537 
  3537         formattedCellData->SetTextSubCellL( 1,
  3538         formattedCellData->SetStretchableTextSubCellL( 1,
  3538             AknLayoutScalable_Avkon::list_single_pane_t1( 0 ) );
  3539             AknLayoutScalable_Avkon::list_single_pane_t1( 0 ),
       
  3540             AknLayoutScalable_Avkon::list_double_pane_vc_t1( 0 ) );
       
  3541         }        
  3539         }        
  3542 
  3540 
  3543     itemDrawer->SetItemMarkReverse( ETrue );
  3541     itemDrawer->SetItemMarkReverse( ETrue );
  3544     itemDrawer->SetItemMarkPosition( 3 );
  3542     itemDrawer->SetItemMarkPosition( 3 );
  3545     itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement );
  3543     itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement );
  3674         AknLayoutScalable_Avkon::list_double_time_pane_t1( 0 ),
  3672         AknLayoutScalable_Avkon::list_double_time_pane_t1( 0 ),
  3675         AknLayoutScalable_Avkon::list_double_time_pane_vc_t1( 4 ) );
  3673         AknLayoutScalable_Avkon::list_double_time_pane_vc_t1( 4 ) );
  3676         
  3674         
  3677     d->SetStretchableTextSubCellL( 3,
  3675     d->SetStretchableTextSubCellL( 3,
  3678         AknLayoutScalable_Avkon::list_double_time_pane_t2( 0 ),
  3676         AknLayoutScalable_Avkon::list_double_time_pane_t2( 0 ),
  3679         AknLayoutScalable_Avkon::list_double_time_pane_vc_t2( 0 ) );
  3677         AknLayoutScalable_Avkon::list_double_time_pane_vc_t2( 3 ) );
  3680 
  3678 
  3681     d->SetStretchableGraphicSubCellL( 4,
  3679     d->SetStretchableGraphicSubCellL( 4,
  3682         AknLayoutScalable_Avkon::list_double_time_pane_g1( 0 ),
  3680         AknLayoutScalable_Avkon::list_double_time_pane_g1( 0 ),
  3683         AknLayoutScalable_Avkon::list_double_time_pane_vc_g1( 0 ) );
  3681         AknLayoutScalable_Avkon::list_double_time_pane_vc_g1( 0 ) );
  3684 
  3682 
  3687         AknLayoutScalable_Avkon::list_double_time_pane_vc_g2( 0 ) );
  3685         AknLayoutScalable_Avkon::list_double_time_pane_vc_g2( 0 ) );
  3688 
  3686 
  3689     // Conditional subcells must be added in priority order!
  3687     // Conditional subcells must be added in priority order!
  3690     d->SetStretchableConditionalSubCellL( 5,
  3688     d->SetStretchableConditionalSubCellL( 5,
  3691         AknLayoutScalable_Avkon::list_double_time_pane_t1( 2 ),
  3689         AknLayoutScalable_Avkon::list_double_time_pane_t1( 2 ),
  3692         AknLayoutScalable_Avkon::list_double_time_pane_vc_t2( 2 ), 2, 3 );
  3690         AknLayoutScalable_Avkon::list_double_time_pane_vc_t2( 5 ), 2, 3 );
  3693 
  3691 
  3694     d->SetStretchableConditionalSubCellL( 4,
  3692     d->SetStretchableConditionalSubCellL( 4,
  3695         AknLayoutScalable_Avkon::list_double_time_pane_t1( 1 ),
  3693         AknLayoutScalable_Avkon::list_double_time_pane_t1( 1 ),
  3696         AknLayoutScalable_Avkon::list_double_time_pane_vc_t2( 1 ), 2, 3 );
  3694         AknLayoutScalable_Avkon::list_double_time_pane_vc_t2( 4 ), 2, 3 );
  3697     _AKNTRACE_FUNC_EXIT;
  3695     _AKNTRACE_FUNC_EXIT;
  3698     }
  3696     }
  3699     
  3697     
  3700 // -----------------------------------------------------------------------------
  3698 // -----------------------------------------------------------------------------
  3701 // CAknDoubleLargeStyleListBox::SizeChanged
  3699 // CAknDoubleLargeStyleListBox::SizeChanged
  3787         }
  3785         }
  3788         
  3786         
  3789     itemDrawer->SetItemMarkReverse( ETrue );
  3787     itemDrawer->SetItemMarkReverse( ETrue );
  3790     itemDrawer->SetItemMarkPosition( 3 );
  3788     itemDrawer->SetItemMarkPosition( 3 );
  3791     itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement );
  3789     itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement );
       
  3790 
       
  3791     // Mirrored layout does not have smiley.
       
  3792     // for conversation
       
  3793     if ( !AknLayoutUtils::LayoutMirrored() && 
       
  3794          itemDrawer->Flags() & CListItemDrawer::EDrawSmileyIcon )
       
  3795         {
       
  3796         formattedCellData->InitSmileyL();
       
  3797         // only second lable can have smiley icon now. 
       
  3798         formattedCellData->SetSmileySubCellL(2);
       
  3799         }
  3792     _AKNTRACE_FUNC_EXIT;
  3800     _AKNTRACE_FUNC_EXIT;
  3793     }
  3801     }
  3794     
  3802     
  3795 // -----------------------------------------------------------------------------
  3803 // -----------------------------------------------------------------------------
  3796 // CAknDoubleStyle2ListBox::SizeChanged
  3804 // CAknDoubleStyle2ListBox::SizeChanged
  4198     CFormattedCellListBoxData* formattedCellData( itemDrawer->FormattedCellData() );
  4206     CFormattedCellListBoxData* formattedCellData( itemDrawer->FormattedCellData() );
  4199 
  4207 
  4200     SetupStretchableListL( this,
  4208     SetupStretchableListL( this,
  4201                           AknLayoutScalable_Avkon::list_setting_pane( 0 ),
  4209                           AknLayoutScalable_Avkon::list_setting_pane( 0 ),
  4202                           AknLayoutScalable_Avkon::list_setting_pane_vc( 0 ),
  4210                           AknLayoutScalable_Avkon::list_setting_pane_vc( 0 ),
  4203                           EFalse );
  4211                           ETrue );
  4204 
  4212 
  4205     SetSeparatorLinePosition( this, EAColumn );
  4213     SetSeparatorLinePosition( this, EAColumn );
  4206     
  4214     
  4207     // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if this
  4215     // Assertion fails in CFormattedCellListBoxData::DrawFormattedSimple if this
  4208     // cell does not exist.
  4216     // cell does not exist.
  4301     CFormattedCellListBoxData* formattedCellData( itemDrawer->FormattedCellData() );
  4309     CFormattedCellListBoxData* formattedCellData( itemDrawer->FormattedCellData() );
  4302 
  4310 
  4303     SetupStretchableListL( this,
  4311     SetupStretchableListL( this,
  4304                           AknLayoutScalable_Avkon::list_setting_number_pane( 0 ),
  4312                           AknLayoutScalable_Avkon::list_setting_number_pane( 0 ),
  4305                           AknLayoutScalable_Avkon::list_setting_number_pane_vc( 0 ),
  4313                           AknLayoutScalable_Avkon::list_setting_number_pane_vc( 0 ),
  4306                           EFalse );
  4314                           ETrue );
  4307 
  4315 
  4308     SetSeparatorLinePosition( this, EABColumn );
  4316     SetSeparatorLinePosition( this, EABColumn );
  4309     
  4317     
  4310     formattedCellData->SetStretchableTextSubCellL( 0,
  4318     formattedCellData->SetStretchableTextSubCellL( 0,
  4311         AknLayoutScalable_Avkon::list_setting_number_pane_t1( 0 ),
  4319         AknLayoutScalable_Avkon::list_setting_number_pane_t1( 0 ),