Fix the Keyboard disappeared issue in TextField
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-label-impl.cpp
index e4a8b53..3d161e0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -672,19 +672,24 @@ void TextLabel::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::
       const std::string& newFont = GetImpl( styleManager ).GetDefaultFontFamily();
       DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel::OnStyleChange StyleChange::DEFAULT_FONT_CHANGE newFont(%s)\n", newFont.c_str() );
       mController->UpdateAfterFontChange( newFont );
+      RelayoutRequest();
       break;
     }
     case StyleChange::DEFAULT_FONT_SIZE_CHANGE:
     {
       GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) );
+      RelayoutRequest();
       break;
     }
     case StyleChange::THEME_CHANGE:
     {
-      GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) );
+      // Nothing to do, let control base class handle this
       break;
     }
   }
+
+  // Up call to Control
+  Control::OnStyleChange( styleManager, change );
 }
 
 Vector3 TextLabel::GetNaturalSize()
@@ -731,7 +736,7 @@ void TextLabel::RenderText()
   {
     renderableActor = mRenderer->Render( mController->GetView(),
                                          alignmentOffset,
-                                         DepthIndex::TEXT );
+                                         DepthIndex::CONTENT );
   }
 
   if( renderableActor != mRenderableActor )
@@ -790,14 +795,6 @@ void TextLabel::OnStageConnect( Dali::Actor actor )
   }
 }
 
-void TextLabel::OnStageConnection( int depth )
-{
-  // Call the Control::OnStageConnection() to set the depth of the background.
-  Control::OnStageConnection( depth );
-
-  // The depth of the text renderer is set in the RenderText() called from OnRelayout().
-}
-
 void TextLabel::ScrollingFinished()
 {
   // Pure Virtual from TextScroller Interface