uifw/AvKon/src/Aknpopupform.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 0 2f259fa3e83a
child 55 aecbbf00d063
equal deleted inserted replaced
16:71dd06cfe933 18:0aa5fbdfbc30
   594             CalculateNumberOfScreens();
   594             CalculateNumberOfScreens();
   595             if (oldNoOfLines != iNoOfEditorLines && IsActivated() )
   595             if (oldNoOfLines != iNoOfEditorLines && IsActivated() )
   596                 {
   596                 {
   597                 ClearArea( Rect() );
   597                 ClearArea( Rect() );
   598                 UpdateScrollIndicatorL();
   598                 UpdateScrollIndicatorL();
       
   599                 // if iNoOfEditorLines becomes small, firstly calculate the New PopupForm layout.
       
   600 				// Because position of PopupForm is related to last PoppupForm layout.
       
   601 				if ( iNoOfEditorLines < oldNoOfLines )
       
   602 					{
       
   603 					TSize size;
       
   604 				    if ( !AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, size ) )
       
   605 				    	{
       
   606 						size = iCoeEnv->ScreenDevice()->SizeInPixels() ;
       
   607 				    	}
       
   608 					SetSizeAndPosition( PreferredSize( size ) );
       
   609 					}
   599                 LayoutAndDraw();
   610                 LayoutAndDraw();
   600                 }
   611                 }
   601             else if ( IsActivated() )
   612             else if ( IsActivated() )
   602                 {
   613                 {
   603                 ClearArea( ed->Rect() );
   614                 ClearArea( ed->Rect() );
  2334 
  2345 
  2335 
  2346 
  2336     UpdateFlags( ctrlType, ETrue );
  2347     UpdateFlags( ctrlType, ETrue );
  2337 
  2348 
  2338     CalculateNumberOfScreens();
  2349     CalculateNumberOfScreens();
       
  2350     // because of insert a control, iNoOfEditorLines of editor become small, 
       
  2351     // but position is calculated by previous size of editor,
       
  2352     // So firstly calculate editor layout.
       
  2353     TSize size;
       
  2354     if ( !AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, size ) )
       
  2355     	{
       
  2356 		size = iCoeEnv->ScreenDevice()->SizeInPixels() ;
       
  2357     	}
       
  2358 	SetSizeAndPosition( PreferredSize( size ) );
  2339     LayoutAndDraw();
  2359     LayoutAndDraw();
  2340     UpdateScrollIndicatorL();
  2360     UpdateScrollIndicatorL();
  2341 
  2361 
  2342     if( ctrl->iControlType == EAknCtBitmapAnimation && IsActivated() )
  2362     if( ctrl->iControlType == EAknCtBitmapAnimation && IsActivated() )
  2343         {
  2363         {