uifw/EikStd/coctlsrc/EIKSCRLB.CPP
branchRCL_3
changeset 72 a5e7a4f63858
parent 59 978afdc0236f
equal deleted inserted replaced
64:85902f042028 72:a5e7a4f63858
  1284                     extension->iDragged = ETrue; // after this time, iLastDragged has value.
  1284                     extension->iDragged = ETrue; // after this time, iLastDragged has value.
  1285                     extension->iLastDrag = now;
  1285                     extension->iLastDrag = now;
  1286 
  1286 
  1287                     thumbPositionPix = position - extension->iPointerOffsetFromThumb;
  1287                     thumbPositionPix = position - extension->iPointerOffsetFromThumb;
  1288                     TInt oldPosition = thumbPosition;
  1288                     TInt oldPosition = thumbPosition;
  1289                     TReal newPosition = (TReal)thumbPositionPix * ( scrollSpan - thumbSpan ) / scrollSpanPix;
  1289                     TReal newPosition = thumbPositionPix * ( scrollSpan - thumbSpan ) / (TReal)scrollSpanPix;
  1290                     thumbPosition = newPosition;
  1290                     thumbPosition = newPosition;
  1291 
  1291 
  1292                     // round the value to the nearest possible position
  1292                     // round the value to the nearest possible position
  1293                     if( TInt(newPosition * 2) >= ((thumbPosition * 2) + 1 ))
  1293                     if( TInt(newPosition * 2) >= ((thumbPosition * 2) + 1 ))
  1294                         {
  1294                         {