photosgallery/viewframework/views/cloudview/src/glxcloudviewcontrol.cpp
branchRCL_3
changeset 22 2dac0fdba72b
parent 14 ce1c7ad1f18b
child 32 78ad99c24f08
equal deleted inserted replaced
18:bcb43dc84c44 22:2dac0fdba72b
    61 const TInt KFontLargest = 44;
    61 const TInt KFontLargest = 44;
    62 const TInt KRowHeight = 72;
    62 const TInt KRowHeight = 72;
    63 const TInt KLeftMargin = 10;
    63 const TInt KLeftMargin = 10;
    64 const TInt KNumMinRowSpace = 2;
    64 const TInt KNumMinRowSpace = 2;
    65 const TInt KColSpace = 20;
    65 const TInt KColSpace = 20;
    66 const TInt KRightmargin = 20;
    66 const TInt KRightmargin = 10;//Aligning Right margin
    67 const TInt KMinTagSize = 77;
    67 const TInt KMinTagSize = 77;
    68 const TInt KTagScreenHeight = 460;
    68 const TInt KTagScreenHeight = 460;
    69 const TReal KBoundaryMargin = 0.1; //10% = 10/100 = 0.1 
    69 const TReal KBoundaryMargin = 0.1; //10% = 10/100 = 0.1 
    70 const TInt KFastCloudMovement = 100; //Transition time to move cloud view
    70 const TInt KFastCloudMovement = 100; //Transition time to move cloud view
    71 const TInt KSlowCloudMovement = 1000; //Transition time to move cloud view
    71 const TInt KSlowCloudMovement = 1000; //Transition time to move cloud view
   154     
   154     
   155     TRect rect;
   155     TRect rect;
   156     AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
   156     AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
   157     iScreenHeight = rect.Height ();
   157     iScreenHeight = rect.Height ();
   158     iParentLayout = CAlfLayout::AddNewL(*this, aAnchorLayout);                    
   158     iParentLayout = CAlfLayout::AddNewL(*this, aAnchorLayout);                    
   159     iTagScreenWidth = rect.Width() - iScrollPaneHandle.iW - KRightmargin;
   159     iTagScreenWidth = rect.Width() - KRightmargin;
   160 
   160 
   161     if(IsLandscape())
   161     if(IsLandscape())
   162         {	
   162         {	
   163         iTagScreenHeight = rect.Height();	
   163         iTagScreenHeight = rect.Height();	
   164         }
   164         }
   228        {
   228        {
   229        iTagsContextMenuControl->ShowItemMenu(EFalse);
   229        iTagsContextMenuControl->ShowItemMenu(EFalse);
   230        }
   230        }
   231     TRect rect;
   231     TRect rect;
   232     AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
   232     AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
   233     if ((rect.Width() != (iTagScreenWidth + iScrollPaneHandle.iW + KRightmargin)) || (rect.Height() != iScreenHeight))
   233     if ((rect.Width() != (iTagScreenWidth + KRightmargin)) || (rect.Height() != iScreenHeight))
   234         {
   234         {
   235         //set the new screen dimensions
   235         //set the new screen dimensions
   236         TRAP_IGNORE(UpdateLayoutL());
   236         TRAP_IGNORE(UpdateLayoutL());
   237         }
   237         }
   238     }
   238     }
  1847             vertBaseElement->makeInterface (IAlfScrollBarDefaultBaseElement::type() ) );
  1847             vertBaseElement->makeInterface (IAlfScrollBarDefaultBaseElement::type() ) );
  1848 
  1848 
  1849         if( iScrollEventData.mSpan )
  1849         if( iScrollEventData.mSpan )
  1850             {       
  1850             {       
  1851             scrollbarbaselement->setThumbOpacity(1.0);  
  1851             scrollbarbaselement->setThumbOpacity(1.0);  
       
  1852             //make scroll bar visible
       
  1853             scrollbarbaselement->setOpacity(1.0);
  1852             }
  1854             }
  1853         else
  1855         else
  1854             {
  1856             {
  1855             scrollbarbaselement->setThumbOpacity(0.0);  
  1857             scrollbarbaselement->setThumbOpacity(0.0);  
       
  1858             //make scroll bar invisible
       
  1859             scrollbarbaselement->setOpacity(0.0);
  1856             }
  1860             }
  1857         }
  1861         }
  1858     }
  1862     }
  1859 
  1863 
  1860 // ---------------------------------------------------------------------------
  1864 // ---------------------------------------------------------------------------
  1863 //
  1867 //
  1864 void CGlxCloudViewControl::UpdateLayoutL() 
  1868 void CGlxCloudViewControl::UpdateLayoutL() 
  1865     {
  1869     {
  1866     TRect rect;
  1870     TRect rect;
  1867     AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
  1871     AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
  1868     if ((rect.Width() != (iTagScreenWidth + iScrollPaneHandle.iW + KRightmargin)) || (rect.Height() != iScreenHeight))
  1872     if ((rect.Width() != (iTagScreenWidth + KRightmargin)) || (rect.Height() != iScreenHeight))
  1869         {
  1873         {
  1870         //set the new screen dimensions
  1874         //set the new screen dimensions
  1871         iScreenHeight=rect.Height();
  1875         iScreenHeight=rect.Height();
  1872        iTagScreenWidth = rect.Width()- iScrollPaneHandle.iW - KRightmargin;
  1876        iTagScreenWidth = rect.Width()- KRightmargin;
  1873         if(IsLandscape())
  1877         if(IsLandscape())
  1874             {   
  1878             {   
  1875             iTagScreenHeight = rect.Height();   
  1879             iTagScreenHeight = rect.Height();   
  1876             }
  1880             }
  1877         else 
  1881         else 
  1994 // ---------------------------------------------------------------------------
  1998 // ---------------------------------------------------------------------------
  1995 //
  1999 //
  1996 void CGlxCloudViewControl::ShowContextItemMenu(TBool aShow)
  2000 void CGlxCloudViewControl::ShowContextItemMenu(TBool aShow)
  1997     {
  2001     {
  1998     iTagsContextMenuControl->ShowItemMenu(aShow);
  2002     iTagsContextMenuControl->ShowItemMenu(aShow);
       
  2003     if(!aShow)
       
  2004         {
       
  2005         iViewPortLayout->UpdateChildrenLayout(0);
       
  2006         }
  1999     }
  2007     }
  2000 
  2008 
  2001 //End of file
  2009 //End of file