browserui/browser/FavouritesSrc/BrowserAdaptiveListPopup.cpp
branchRCL_3
changeset 56 3154c14a33db
parent 55 08ffbd51e3fd
equal deleted inserted replaced
55:08ffbd51e3fd 56:3154c14a33db
    54 _LIT( KDirTab, "0\t");//prefix for directories
    54 _LIT( KDirTab, "0\t");//prefix for directories
    55 const TInt KArrayGranularity = 10;
    55 const TInt KArrayGranularity = 10;
    56 _LIT( KProtocolIdentifier,"://" );
    56 _LIT( KProtocolIdentifier,"://" );
    57 const TUint KSlash('/');
    57 const TUint KSlash('/');
    58 const TUint KPeriod('.');
    58 const TUint KPeriod('.');
    59 const TInt KListHeight = 45;
    59 const TInt KListHeight = 36;
       
    60 const TInt KLandscapeListItems = 5;
    60 const TInt KFontHeight = 150;
    61 const TInt KFontHeight = 150;
    61 
    62 
    62 static void TextPos(TPoint *aResultArray, const TAknTextLineLayout
    63 static void TextPos(TPoint *aResultArray, const TAknTextLineLayout
    63 &aLayout, TSize aItemSize)
    64 &aLayout, TSize aItemSize)
    64     {
    65     {
   574                 buf.Format( _L( "%S%S" ), &KItemTab, &textToShow );
   575                 buf.Format( _L( "%S%S" ), &KItemTab, &textToShow );
   575                 }
   576                 }
   576             iItemNamesToShow->AppendL( buf );
   577             iItemNamesToShow->AppendL( buf );
   577             }
   578             }
   578         //set how many item will be shown
   579         //set how many item will be shown
       
   580         
       
   581 #ifdef BRDO_TOUCH_ENABLED_FF        
       
   582         TInt appWidth = iEikonEnv->EikAppUi()->ApplicationRect().Width();
       
   583         TInt appHeight = iEikonEnv->EikAppUi()->ApplicationRect().Height();
       
   584         //For landscape mode only 5 items can be shown on the screen
       
   585         if(appWidth > appHeight) 
       
   586             iMaxRecentUrlsToShow = KLandscapeListItems;
       
   587 #endif     
   579         TInt itemstoshow;
   588         TInt itemstoshow;
   580 
       
   581         if ( k >  iMaxRecentUrlsToShow)
   589         if ( k >  iMaxRecentUrlsToShow)
   582             {
   590             {
   583             itemstoshow = iMaxRecentUrlsToShow;
   591             itemstoshow = iMaxRecentUrlsToShow;
   584             }
   592             }
   585         else
   593         else
   586             {
   594             {
   587             itemstoshow = k;
   595             itemstoshow = k;
   588             }
   596             }
   589 
   597         //resetting to original value
       
   598         iMaxRecentUrlsToShow = CBrowserAppUi::Static()->ContentView()->ApiProvider().Preferences().MaxRecentUrls(); 
       
   599         
   590         //set the main rect of the window
   600         //set the main rect of the window
   591         // fixing bug RFON-7E2PPV, don't use ApplicationRect()
   601         // fixing bug RFON-7E2PPV, don't use ApplicationRect()
   592         TRect  rect;
   602         TRect  rect;
   593         AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
   603         AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
   594         windowLineLayoutMain = AknLayout::main_pane( rect, 0, 2, 1 );
   604         windowLineLayoutMain = AknLayout::main_pane( rect, 0, 2, 1 );