vtuis/videotelui/src/CVtUiEndCallButton.cpp
branchRCL_3
changeset 17 392fdfb57a78
parent 12 f84a661cfc1d
--- a/vtuis/videotelui/src/CVtUiEndCallButton.cpp	Wed Mar 31 21:35:06 2010 +0300
+++ b/vtuis/videotelui/src/CVtUiEndCallButton.cpp	Wed Apr 14 16:00:08 2010 +0300
@@ -30,6 +30,7 @@
 #include    "CVtUiEndCallButton.h"
 #include    "VtUiLayout.h"
 
+const TInt KEndCallButtonText = 255;
 
 // -----------------------------------------------------------------------------
 // CVtUiEndCallButton::CVtUiEndCallButton
@@ -238,7 +239,19 @@
     TRgb brushColor;
     GetTextColors( penColor ); 
     
-    iLayoutText.DrawText( aGc, state->Text(), EFalse, penColor );
+    // buffer for visually ordered text
+    TBuf< KEndCallButtonText + KAknBidiExtraSpacePerLine> visualText; 
+    TInt clipWidth = iLayoutText.TextRect().Width();
+        
+    // bidi processing - using AknBidiTextUtils.
+    AknBidiTextUtils::ConvertToVisualAndClip(
+            state->Text(),
+            visualText,
+            *iLayoutText.Font(),
+            clipWidth,
+            clipWidth );
+    
+    iLayoutText.DrawText( aGc, visualText, EFalse, penColor );
     
     const CGulIcon* icon = GetCurrentIcon();