409 newThumbPos.iY = iTopPoint.iY + iMaxOffset - |
409 newThumbPos.iY = iTopPoint.iY + iMaxOffset - |
410 (pixelsFromBase + pixelsPerStep/2 + |
410 (pixelsFromBase + pixelsPerStep/2 + |
411 iIconZoomMarker[0]->SizeInPixels().iHeight * |
411 iIconZoomMarker[0]->SizeInPixels().iHeight * |
412 KDivisorFactor / 2) / KDivisorFactor; |
412 KDivisorFactor / 2) / KDivisorFactor; |
413 |
413 |
|
414 // Centralize thumb and slider X-axis. |
|
415 TRect old = TRect(newThumbPos,iIconZoomMarkerCurrent->SizeInPixels()); |
|
416 newThumbPos.iX += iSliderParentRect.Center().iX - old.Center().iX; |
|
417 |
414 aGc.BitBlt( newThumbPos, iIconZoomMarkerCurrent ); |
418 aGc.BitBlt( newThumbPos, iIconZoomMarkerCurrent ); |
415 PRINT( _L( "Camera <= CCamZoomPane::DrawThumb " ) ); |
419 PRINT( _L( "Camera <= CCamZoomPane::DrawThumb " ) ); |
416 } |
420 } |
417 |
421 |
418 // ----------------------------------------------------------------------------- |
422 // ----------------------------------------------------------------------------- |
610 PRINT( _L( "Camera <= CCamZoomPane::HandleControllerEventL " ) ); |
614 PRINT( _L( "Camera <= CCamZoomPane::HandleControllerEventL " ) ); |
611 } |
615 } |
612 |
616 |
613 // ----------------------------------------------------------------------------- |
617 // ----------------------------------------------------------------------------- |
614 // CCamZoomPane::Rect |
618 // CCamZoomPane::Rect |
615 // Returns the zoom pane rect |
619 // Returns the whole zoom pane rect |
616 // ----------------------------------------------------------------------------- |
620 // ----------------------------------------------------------------------------- |
617 // |
621 // |
618 TRect CCamZoomPane::Rect() const |
622 TRect CCamZoomPane::Extent() const |
619 { |
623 { |
620 PRINT( _L( "Camera =><= CCamZoomPane::Rect " ) ); |
624 PRINT( _L( "Camera =><= CCamZoomPane::Extent " ) ); |
621 return iZoomPaneRect; |
625 return iExtent; |
622 } |
626 } |
623 |
627 |
624 // --------------------------------------------------------- |
628 // --------------------------------------------------------- |
625 // CCamZoomPane::ReadLayoutL |
629 // CCamZoomPane::ReadLayoutL |
626 // --------------------------------------------------------- |
630 // --------------------------------------------------------- |
627 // |
631 // |
628 void CCamZoomPane::ReadLayoutL() |
632 void CCamZoomPane::ReadLayoutL() |
629 { |
633 { |
630 PRINT( _L( "Camera =><= CCamZoomPane::ReadLayoutL " ) ); |
634 PRINT( _L( "Camera =><= CCamZoomPane::ReadLayoutL " ) ); |
631 |
635 |
632 if ( CamUtility::IsNhdDevice() ) |
636 if ( AknLayoutUtils::PenEnabled() ) |
633 { |
637 { |
634 TouchLayout(); |
638 TouchLayout(); |
635 } |
639 } |
636 else |
640 else |
637 { |
641 { |
1096 iZoomPaneRect = area.Rect(); |
1100 iZoomPaneRect = area.Rect(); |
1097 |
1101 |
1098 l = AknLayoutScalable_Apps::cam4_zoom_cont_pane(variant); |
1102 l = AknLayoutScalable_Apps::cam4_zoom_cont_pane(variant); |
1099 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1103 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1100 iSliderParentRect = area.Rect(); |
1104 iSliderParentRect = area.Rect(); |
|
1105 iExtent = iSliderParentRect; |
1101 |
1106 |
1102 l = AknLayoutScalable_Apps::cam4_zoom_pane_g1(variant); // + |
1107 l = AknLayoutScalable_Apps::cam4_zoom_pane_g1(variant); // + |
1103 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1108 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1104 AknIconUtils::SetSize( iIconZoomMax[0], area.Rect().Size(), |
1109 AknIconUtils::SetSize( iIconZoomMax[0], area.Rect().Size(), |
1105 EAspectRatioNotPreserved ); |
1110 EAspectRatioNotPreserved ); |
1106 iPlusPoint = area.Rect().iTl; |
1111 iPlusPoint = area.Rect().iTl; |
|
1112 iExtent.BoundingRect(area.Rect()); |
1107 |
1113 |
1108 l = AknLayoutScalable_Apps::cam4_zoom_pane_g2(variant); // - |
1114 l = AknLayoutScalable_Apps::cam4_zoom_pane_g2(variant); // - |
1109 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1115 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1110 AknIconUtils::SetSize( iIconZoomMin[0], area.Rect().Size(), |
1116 AknIconUtils::SetSize( iIconZoomMin[0], area.Rect().Size(), |
1111 EAspectRatioNotPreserved ); |
1117 EAspectRatioNotPreserved ); |
1112 iMinusPoint = area.Rect().iTl; |
1118 iMinusPoint = area.Rect().iTl; |
|
1119 iExtent.BoundingRect(area.Rect()); |
1113 |
1120 |
1114 l = AknLayoutScalable_Apps::cam4_zoom_cont_pane_g1(variant); // Top |
1121 l = AknLayoutScalable_Apps::cam4_zoom_cont_pane_g1(variant); // Top |
1115 area.LayoutRect( iSliderParentRect, l.LayoutLine() ); |
1122 area.LayoutRect( iSliderParentRect, l.LayoutLine() ); |
1116 AknIconUtils::SetSize( iIconZoomTop[0], area.Rect().Size(), |
1123 AknIconUtils::SetSize( iIconZoomTop[0], area.Rect().Size(), |
1117 EAspectRatioNotPreserved ); |
1124 EAspectRatioNotPreserved ); |
1139 TRect adj = iZoomPaneRect; |
1146 TRect adj = iZoomPaneRect; |
1140 adj.SetHeight( area.Rect().Height() ); |
1147 adj.SetHeight( area.Rect().Height() ); |
1141 adj.Move( bottomRect.Center() - adj.Center() ); |
1148 adj.Move( bottomRect.Center() - adj.Center() ); |
1142 AknIconUtils::SetSize( iIconZoomMarker[0], adj.Size() ); |
1149 AknIconUtils::SetSize( iIconZoomMarker[0], adj.Size() ); |
1143 AknIconUtils::SetSize( iIconZoomMarkerGray[0], adj.Size() ); |
1150 AknIconUtils::SetSize( iIconZoomMarkerGray[0], adj.Size() ); |
|
1151 |
|
1152 if( iPlusPoint.iY < iTopPoint.iY ) |
|
1153 { |
|
1154 // Thumb is drawn further than shaft. |
|
1155 // If Max(+) and Min(-) marks are extending shaft, |
|
1156 // parent rectangle covers everything. |
|
1157 iExtent = iZoomPaneRect; |
|
1158 } |
|
1159 else |
|
1160 { |
|
1161 // If marks are drawn right side of shaft, |
|
1162 // extend area to redraw. |
|
1163 iExtent.Grow(0, adj.Size().iHeight/2); |
|
1164 } |
1144 |
1165 |
1145 } |
1166 } |
1146 |
1167 |
1147 // --------------------------------------------------------- |
1168 // --------------------------------------------------------- |
1148 // CCamZoomPane::NonTouchLayout |
1169 // CCamZoomPane::NonTouchLayout |
1164 iZoomPaneRect = area.Rect(); |
1185 iZoomPaneRect = area.Rect(); |
1165 |
1186 |
1166 l = AknLayoutScalable_Apps::cam6_zoom_cont_pane(variant); |
1187 l = AknLayoutScalable_Apps::cam6_zoom_cont_pane(variant); |
1167 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1188 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1168 iSliderParentRect = area.Rect(); |
1189 iSliderParentRect = area.Rect(); |
|
1190 iExtent = iSliderParentRect; |
1169 |
1191 |
1170 l = AknLayoutScalable_Apps::cam6_zoom_pane_g1(variant); // + |
1192 l = AknLayoutScalable_Apps::cam6_zoom_pane_g1(variant); // + |
1171 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1193 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1172 AknIconUtils::SetSize( iIconZoomMax[0], area.Rect().Size(), |
1194 AknIconUtils::SetSize( iIconZoomMax[0], area.Rect().Size(), |
1173 EAspectRatioNotPreserved ); |
1195 EAspectRatioNotPreserved ); |
1174 iPlusPoint = area.Rect().iTl; |
1196 iPlusPoint = area.Rect().iTl; |
|
1197 iExtent.BoundingRect(area.Rect()); |
1175 |
1198 |
1176 l = AknLayoutScalable_Apps::cam6_zoom_pane_g2(variant); // - |
1199 l = AknLayoutScalable_Apps::cam6_zoom_pane_g2(variant); // - |
1177 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1200 area.LayoutRect( iZoomPaneRect, l.LayoutLine() ); |
1178 AknIconUtils::SetSize( iIconZoomMin[0], area.Rect().Size(), |
1201 AknIconUtils::SetSize( iIconZoomMin[0], area.Rect().Size(), |
1179 EAspectRatioNotPreserved ); |
1202 EAspectRatioNotPreserved ); |
1180 iMinusPoint = area.Rect().iTl; |
1203 iMinusPoint = area.Rect().iTl; |
|
1204 iExtent.BoundingRect(area.Rect()); |
1181 |
1205 |
1182 l = AknLayoutScalable_Apps::cam6_zoom_cont_pane_g1(variant); // Top |
1206 l = AknLayoutScalable_Apps::cam6_zoom_cont_pane_g1(variant); // Top |
1183 area.LayoutRect( iSliderParentRect, l.LayoutLine() ); |
1207 area.LayoutRect( iSliderParentRect, l.LayoutLine() ); |
1184 AknIconUtils::SetSize( iIconZoomTop[0], area.Rect().Size(), |
1208 AknIconUtils::SetSize( iIconZoomTop[0], area.Rect().Size(), |
1185 EAspectRatioNotPreserved ); |
1209 EAspectRatioNotPreserved ); |
1205 l = AknLayoutScalable_Apps::cam6_zoom_pane_g3(variant); // Knob |
1229 l = AknLayoutScalable_Apps::cam6_zoom_pane_g3(variant); // Knob |
1206 area.LayoutRect(iSliderParentRect, l.LayoutLine() ); |
1230 area.LayoutRect(iSliderParentRect, l.LayoutLine() ); |
1207 iZoomPaneRect.iTl.iX += area.Rect().Width()/2; |
1231 iZoomPaneRect.iTl.iX += area.Rect().Width()/2; |
1208 AknIconUtils::SetSize( iIconZoomMarker[0], area.Rect().Size() ); |
1232 AknIconUtils::SetSize( iIconZoomMarker[0], area.Rect().Size() ); |
1209 AknIconUtils::SetSize( iIconZoomMarkerGray[0], area.Rect().Size() ); |
1233 AknIconUtils::SetSize( iIconZoomMarkerGray[0], area.Rect().Size() ); |
|
1234 |
|
1235 if( iPlusPoint.iY < iTopPoint.iY ) |
|
1236 { |
|
1237 // Thumb is drawn further than shaft. |
|
1238 // If Max(+) and Min(-) marks are extending shaft, |
|
1239 // parent rectangle covers everything. |
|
1240 iExtent = iZoomPaneRect; |
|
1241 } |
|
1242 else |
|
1243 { |
|
1244 // If marks are drawn right side of shaft, |
|
1245 // extend area to redraw. |
|
1246 iExtent.Grow(0, area.Rect().Size().iHeight/2); |
|
1247 } |
1210 } |
1248 } |
1211 |
1249 |
1212 // --------------------------------------------------------- |
1250 // --------------------------------------------------------- |
1213 // CCamZoomPane::Touchfeedback |
1251 // CCamZoomPane::Touchfeedback |
1214 // --------------------------------------------------------- |
1252 // --------------------------------------------------------- |