camerauis/cameraapp/generic/src/CamZoomPane.cpp
branchRCL_3
changeset 67 756ad29ed18e
parent 57 2c87b2808fd7
--- a/camerauis/cameraapp/generic/src/CamZoomPane.cpp	Wed Sep 15 11:51:19 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamZoomPane.cpp	Wed Oct 13 14:09:54 2010 +0300
@@ -411,10 +411,6 @@
               iIconZoomMarker[0]->SizeInPixels().iHeight * 
               KDivisorFactor / 2) / KDivisorFactor;                                                        
         
-    // Centralize thumb and slider X-axis.
-    TRect old = TRect(newThumbPos,iIconZoomMarkerCurrent->SizeInPixels());
-    newThumbPos.iX += iSliderParentRect.Center().iX - old.Center().iX;
-
     aGc.BitBlt( newThumbPos, iIconZoomMarkerCurrent ); 
     PRINT( _L( "Camera <= CCamZoomPane::DrawThumb " ) );                   
     }
@@ -616,13 +612,13 @@
 
 // -----------------------------------------------------------------------------
 // CCamZoomPane::Rect
-// Returns the whole zoom pane rect
+// Returns the zoom pane rect
 // -----------------------------------------------------------------------------
 //
-TRect CCamZoomPane::Extent() const
+TRect CCamZoomPane::Rect() const
     {
-    PRINT( _L( "Camera =><= CCamZoomPane::Extent " ) );
-    return iExtent;      
+    PRINT( _L( "Camera =><= CCamZoomPane::Rect " ) );
+    return iZoomPaneRect;
     }
 
 // ---------------------------------------------------------
@@ -633,7 +629,7 @@
     {   
     PRINT( _L( "Camera =><= CCamZoomPane::ReadLayoutL " ) );
     
-    if ( AknLayoutUtils::PenEnabled() ) 
+    if ( CamUtility::IsNhdDevice() ) 
         {
         TouchLayout();
         }
@@ -1068,7 +1064,7 @@
 void CCamZoomPane::SizeChanged() 
     {
     PRINT( _L( "Camera => CCamZoomPane::SizeChanged" ) );
-    if ( AknLayoutUtils::PenEnabled() ) 
+    if ( CamUtility::IsNhdDevice() ) 
         {
         TouchLayout();
         }
@@ -1102,21 +1098,18 @@
     l = AknLayoutScalable_Apps::cam4_zoom_cont_pane(variant); 
     area.LayoutRect( iZoomPaneRect, l.LayoutLine() );
     iSliderParentRect = area.Rect();
-    iExtent = iSliderParentRect;
     
     l = AknLayoutScalable_Apps::cam4_zoom_pane_g1(variant); // +
     area.LayoutRect( iZoomPaneRect, l.LayoutLine() );
     AknIconUtils::SetSize( iIconZoomMax[0], area.Rect().Size(), 
                            EAspectRatioNotPreserved );
-    iPlusPoint = area.Rect().iTl;   
-    iExtent.BoundingRect(area.Rect());
+    iPlusPoint = area.Rect().iTl;                       
     
     l = AknLayoutScalable_Apps::cam4_zoom_pane_g2(variant); // -
     area.LayoutRect( iZoomPaneRect, l.LayoutLine() );
     AknIconUtils::SetSize( iIconZoomMin[0], area.Rect().Size(), 
                            EAspectRatioNotPreserved );
-    iMinusPoint = area.Rect().iTl;    
-    iExtent.BoundingRect(area.Rect());
+    iMinusPoint = area.Rect().iTl;                             
     
     l = AknLayoutScalable_Apps::cam4_zoom_cont_pane_g1(variant); // Top
     area.LayoutRect( iSliderParentRect, l.LayoutLine() );
@@ -1148,20 +1141,6 @@
 	adj.Move( bottomRect.Center() - adj.Center() );
     AknIconUtils::SetSize( iIconZoomMarker[0], adj.Size() );  
     AknIconUtils::SetSize( iIconZoomMarkerGray[0], adj.Size() );
-
-    if( iPlusPoint.iY < iTopPoint.iY )
-        {
-        // Thumb is drawn further than shaft.
-        // If Max(+) and Min(-) marks are extending shaft,
-        // parent rectangle covers everything.
-        iExtent = iZoomPaneRect;
-        }
-    else
-        {
-        // If marks are drawn right side of shaft,
-        // extend area to redraw.
-        iExtent.Grow(0, adj.Size().iHeight/2);
-        }
    
     }
 
@@ -1187,21 +1166,18 @@
     l = AknLayoutScalable_Apps::cam6_zoom_cont_pane(variant); 
     area.LayoutRect( iZoomPaneRect, l.LayoutLine() );
     iSliderParentRect = area.Rect();
-    iExtent = iSliderParentRect;
     
     l = AknLayoutScalable_Apps::cam6_zoom_pane_g1(variant); // +
     area.LayoutRect( iZoomPaneRect, l.LayoutLine() );
     AknIconUtils::SetSize( iIconZoomMax[0], area.Rect().Size(), 
                            EAspectRatioNotPreserved );
-    iPlusPoint = area.Rect().iTl;       
-    iExtent.BoundingRect(area.Rect());
+    iPlusPoint = area.Rect().iTl;                       
     
     l = AknLayoutScalable_Apps::cam6_zoom_pane_g2(variant); // -
     area.LayoutRect( iZoomPaneRect, l.LayoutLine() );
     AknIconUtils::SetSize( iIconZoomMin[0], area.Rect().Size(), 
                            EAspectRatioNotPreserved );
-    iMinusPoint = area.Rect().iTl;       
-    iExtent.BoundingRect(area.Rect());
+    iMinusPoint = area.Rect().iTl;                             
     
     l = AknLayoutScalable_Apps::cam6_zoom_cont_pane_g1(variant); // Top
     area.LayoutRect( iSliderParentRect, l.LayoutLine() );
@@ -1231,20 +1207,6 @@
     iZoomPaneRect.iTl.iX += area.Rect().Width()/2;
     AknIconUtils::SetSize( iIconZoomMarker[0], area.Rect().Size() );  
     AknIconUtils::SetSize( iIconZoomMarkerGray[0], area.Rect().Size() );    
-
-    if( iPlusPoint.iY < iTopPoint.iY )
-        {
-        // Thumb is drawn further than shaft.
-        // If Max(+) and Min(-) marks are extending shaft,
-        // parent rectangle covers everything.
-        iExtent = iZoomPaneRect;
-        }
-    else
-        {
-        // If marks are drawn right side of shaft,
-        // extend area to redraw.
-        iExtent.Grow(0, area.Rect().Size().iHeight/2);
-        }
     }
     
 // ---------------------------------------------------------