menufw/menufwui/mmwidgets/src/mmgrid.cpp
changeset 5 c743ef5928ba
parent 4 4d54b72983ae
child 9 f966699dea19
equal deleted inserted replaced
4:4d54b72983ae 5:c743ef5928ba
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:
    14 * Description:
    15 *  Version     : %version: MM_97 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: MM_98 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #include <AknsDrawUtils.h>
    20 #include <AknsDrawUtils.h>
    94         if ( customGc )
    94         if ( customGc )
    95             {
    95             {
    96             CListItemDrawer* itemDrawer = aListBox->View()->ItemDrawer();
    96             CListItemDrawer* itemDrawer = aListBox->View()->ItemDrawer();
    97             CWindowGc* originalGc = itemDrawer->Gc();
    97             CWindowGc* originalGc = itemDrawer->Gc();
    98             if ( customGc == originalGc )
    98             if ( customGc == originalGc )
    99             {
    99                 {
   100                 return NULL;
   100                 return NULL;
   101                 }
   101                 }
   102             else
   102             else
   103                 {
   103                 {
   104                 itemDrawer->SetGc( customGc );
   104                 itemDrawer->SetGc( customGc );
   865 //
   865 //
   866 // -----------------------------------------------------------------------------
   866 // -----------------------------------------------------------------------------
   867 //
   867 //
   868 void CMmGrid::UpdateScrollBarsL()
   868 void CMmGrid::UpdateScrollBarsL()
   869     {
   869     {
   870     TBool redrawNeeded = HandleScrollbarVisibilityChangeL();
   870     TBool visibilityChanged = HandleScrollbarVisibilityChangeL();
   871     if (ScrollBarFrame()->VerticalScrollBar()->IsVisible())
   871     if (ScrollBarFrame()->VerticalScrollBar()->IsVisible())
   872         {
   872         {
   873         CAknGrid::UpdateScrollBarsL();
   873         CAknGrid::UpdateScrollBarsL();
   874         }
   874         }
   875     iCurrentTopItemIndex = TopItemIndex();
   875     iCurrentTopItemIndex = TopItemIndex();
   876     iMmDrawer->TemplateLibrary()->SetScrollbarWidthL(
   876     iMmDrawer->TemplateLibrary()->SetScrollbarWidthL(
   877             ScrollBarFrame()->VerticalScrollBar()->Rect().Width() + ScrollBarOffset() );
   877             ScrollBarFrame()->VerticalScrollBar()->Rect().Width() + ScrollBarOffset() );
   878     FixViewForMirroredLayout();
   878     FixViewForMirroredLayout();
       
   879     if ( visibilityChanged )
       
   880         {
       
   881         CMmGridView* view = static_cast<CMmGridView*>( iView );
       
   882         view->UpdateItemHeightAndWidth();
       
   883         }
   879     }
   884     }
   880 
   885 
   881 // -----------------------------------------------------------------------------
   886 // -----------------------------------------------------------------------------
   882 //
   887 //
   883 // -----------------------------------------------------------------------------
   888 // -----------------------------------------------------------------------------