textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp
branchRCL_3
changeset 19 ac7e4d1d9209
parent 12 5e18d8c489d6
--- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp	Thu Jul 15 19:01:13 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp	Thu Aug 19 10:15:25 2010 +0300
@@ -37,6 +37,8 @@
 
 const TInt KDisplayTextLen = KMaxItemTextLength + KAknBidiExtraSpacePerLine;
 
+const TInt KTextRectMargin = 4;
+
 EXPORT_C CFepLayoutScrollableList* CFepLayoutScrollableList::NewL(CFepUiLayout* aUiLayout,
                                                                   TInt aControlId,
                                                                   TSize aItemSize,
@@ -500,6 +502,14 @@
         AknBidiTextUtils::ConvertToVisualAndClip(item->iText, buf, *iFont,
                                          itemRect.Width(), itemRect.Width());
 	    }
+    
+	if ( itemRect.Height() - font->FontMaxHeight() < KTextRectMargin )
+    	{
+	    // Make sure the height of the area for drawing text is larger than 
+	    // the max height of font by 4 pixels at least.
+	    // The piece of code is used to avoid clipping some characters, like 'g'.
+        itemRect.SetHeight( font->FontMaxHeight() + KTextRectMargin );
+    	}
 	gc->DrawText(buf, itemRect, baseLine, iAlign);
 	gc->DiscardFont();
     }
@@ -608,7 +618,7 @@
 
 EXPORT_C void CFepLayoutScrollableList::HandleControlEvent(TInt aEventType, 
                                                   CFepUiBaseCtrl* aCtrl,
-                                                  const TDesC& aEventData)
+                                                  const TDesC& /*aEventData*/)
     {
     if( aEventType ==  EEventButtonUp )
         {