textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutchoicelist.cpp
branchRCL_3
changeset 21 ecbabf52600f
parent 20 ebd48d2de13c
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutchoicelist.cpp	Tue Aug 31 15:31:50 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutchoicelist.cpp	Wed Sep 01 12:23:33 2010 +0100
@@ -238,6 +238,7 @@
     SetControlType(ECtrlPopupChoiceList);
 	iSubItemSkinID 		= KAknsIIDNone;
 	iBackgroundSkinID   = KAknsIIDNone;
+	iAlign              = CGraphicsContext::ELeft;
     }
 
 // CFepLayoutChoiceList::HitTest
@@ -294,7 +295,7 @@
 		#ifdef RD_TACTILE_FEEDBACK
         if (UiLayout()->SupportTactileFeedback())
         	{
-        	UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad, ETrue, EFalse);
+        	UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveInput, ETrue, EFalse);
         	}
 		#endif //RD_TACTILE_FEEDBACK     
         }
@@ -307,12 +308,6 @@
             iCurFocusItem = index;
        		Draw();
             UpdateArea(Rect(),EFalse);
-			#ifdef RD_TACTILE_FEEDBACK
-            if (UiLayout()->SupportTactileFeedback())
-            	{
-            	UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad);
-            	}
-			#endif //RD_TACTILE_FEEDBACK
             }
         }
     return this;
@@ -353,7 +348,7 @@
             {
             if ( iLastSelIndex != iCurFocusItem) 
                 {
-                UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad);
+                UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveInput);
                 iLastSelIndex = iCurFocusItem;
                 }
             }
@@ -391,7 +386,7 @@
 		#ifdef RD_TACTILE_FEEDBACK
 		if (UiLayout()->SupportTactileFeedback())
 			{
-			UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveKeypad, ETrue, EFalse);
+			UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveInput, ETrue, EFalse);
 			}
 		#endif //RD_TACTILE_FEEDBACK	
         }
@@ -451,7 +446,7 @@
        	    iSubItemSkinID.iMinor != EAknsMinorNone)
        		{
        		gc->Activate( BitmapDevice() ); 
-			AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+			AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
                          *gc, 
                          rtFocusRect, 
                          rtInnerRect,
@@ -487,7 +482,7 @@
         gc->SetPenColor(iFontColor);
         gc->SetPenStyle(CGraphicsContext::ESolidPen);
 
-        gc->DrawText(aItem.iText, aRect, iBaseline, CGraphicsContext::ELeft, iMargin);
+        gc->DrawText(aItem.iText, aRect, iBaseline, iAlign, iMargin);
 
         gc->DiscardFont();
         }
@@ -510,7 +505,7 @@
 	    CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc());
 	    
 	    gc->Activate( BitmapDevice() ); 
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 	                     *gc, 
 	                     aRect, 
 	                     rtInnerRect,
@@ -585,6 +580,7 @@
 //
 EXPORT_C void CFepLayoutChoiceList::OnDisplay()
     {
+    iCurFocusItem = -1; 
     ReCalcLayout();
     }
 
@@ -657,4 +653,9 @@
     {
     TRAP_IGNORE(AfterDisplayedL());
     }
+
+EXPORT_C void CFepLayoutChoiceList::SetTextAlignment(const CGraphicsContext::TTextAlign aAlign)
+	{
+	iAlign = aAlign;
+	}
 //End Of File