uifw/EikStd/coctlsrc/AknDoubleSpanScrollIndicator.cpp
branchRCL_3
changeset 10 9f56a4e1b8ab
parent 4 8ca85d2f0db7
child 23 3d340a0166ff
equal deleted inserted replaced
9:aabf2c525e0f 10:9f56a4e1b8ab
    67     }
    67     }
    68 
    68 
    69 void CAknDoubleSpanScrollIndicator::Draw(const TRect& /*aRect*/) const
    69 void CAknDoubleSpanScrollIndicator::Draw(const TRect& /*aRect*/) const
    70     {
    70     {
    71     CWindowGc& gc = SystemGc();
    71     CWindowGc& gc = SystemGc();
    72 
    72     if( iDrawBackground || iForceDrawBackground )
    73     if(iDrawBackground)
    73 
    74         {
    74         {
    75         DrawBackground();
    75         DrawBackground();
    76         }
    76         }
    77     
    77     
    78     CAknDoubleSpanScrollIndicatorItem* handleBackgroundBar = 
    78     CAknDoubleSpanScrollIndicatorItem* handleBackgroundBar = 
   216         checkedFocusPosition, 
   216         checkedFocusPosition, 
   217         checkedWindowSize, 
   217         checkedWindowSize, 
   218         checkedFieldPosition, 
   218         checkedFieldPosition, 
   219         checkedFieldSize);
   219         checkedFieldSize);
   220     
   220     
       
   221     TBool wasEmpty = iBackgroundRect.IsEmpty();
       
   222     TBool isEmpty = EFalse;
       
   223 
   221     // If span (max number of items) is zero, then draw only the background
   224     // If span (max number of items) is zero, then draw only the background
   222     if ( checkedScrollSpan == 0 || ( checkedScrollSpan <= checkedWindowSize ) )
   225     if ( checkedScrollSpan == 0 || ( checkedScrollSpan <= checkedWindowSize ) )
   223         {
   226         {
   224         iBackgroundRect = TRect( 0, 0, 0, 0 );
   227         iBackgroundRect = TRect( 0, 0, 0, 0 );
   225         iHandleBackgroundRect = TRect(0,0,0,0);
   228         iHandleBackgroundRect = TRect(0,0,0,0);
   226         iHandleRect = TRect(0,0,0,0);
   229         iHandleRect = TRect(0,0,0,0);
       
   230         iForceDrawBackground = ETrue; // to enable background drawing
       
   231         isEmpty = ETrue;
       
   232         }
       
   233     else
       
   234         {
       
   235         iForceDrawBackground = EFalse;
       
   236         }
       
   237     if ( wasEmpty != isEmpty || iForceDrawBackground )
       
   238         {
       
   239         DrawDeferred();
       
   240         }
       
   241     
       
   242     if ( isEmpty )
       
   243         {
   227         return;
   244         return;
   228         }
   245         }
   229 
   246 
   230     // 
   247     // 
   231     // Transform values into pixels and rects.
   248     // Transform values into pixels and rects.