mpxplugins/viewplugins/views/commonplaybackview/src/mpxplaybackviewinfolabel.cpp
changeset 1 8118492f1bdf
parent 0 ff3acec5bc43
child 4 beaa16f65879
--- a/mpxplugins/viewplugins/views/commonplaybackview/src/mpxplaybackviewinfolabel.cpp	Thu Dec 17 08:45:05 2009 +0200
+++ b/mpxplugins/viewplugins/views/commonplaybackview/src/mpxplaybackviewinfolabel.cpp	Thu Jan 07 12:45:53 2010 +0200
@@ -69,7 +69,7 @@
         iMarquee->SetContainerWindowL( *this );
         }
     }
-    
+
 // ---------------------------------------------------------------------------
 // Destructor
 // ---------------------------------------------------------------------------
@@ -80,7 +80,7 @@
     delete iMarquee;
     iBackground = NULL;
     }
-    
+
 // ---------------------------------------------------------------------------
 // Set background bitmap
 // ---------------------------------------------------------------------------
@@ -112,7 +112,7 @@
         TInt baselineOffset = 0;
         if ( iMarquee )
             {
-            const CAknLayoutFont* layoutFont = 
+            const CAknLayoutFont* layoutFont =
                 CAknLayoutFont::AsCAknLayoutFontOrNull( Font() );
             if ( layoutFont )
                 {
@@ -222,6 +222,14 @@
     __ASSERT_DEBUG( iFont, User::Panic( KPanicCat, EFontNotSet ) );
 
     TBool need( EFalse );
+    // We don't scroll text more than 250 chars in length.
+    if ( iFullText )
+    	{
+    	if ( iFullText->Length() > 250 )
+			{
+			return need;
+			}
+		}
     if ( iFullText && iFont->TextWidthInPixels( *iFullText ) > Size().iWidth )
         {
         need = ETrue;
@@ -235,7 +243,7 @@
 //
 TInt CMPXPlaybackViewInfoLabel::RedrawCallback( TAny* aPtr )
     {
-    CMPXPlaybackViewInfoLabel* self = 
+    CMPXPlaybackViewInfoLabel* self =
         static_cast<CMPXPlaybackViewInfoLabel*>( aPtr );
     CWindowGc& gc = self->SystemGc();
     gc.Activate( *self->DrawableWindow() );