Merge "Fixes the change of style when the text-field grabs the keyboard focus." into...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / control-impl.cpp
index 6434772..b4b9cdb 100644 (file)
@@ -584,8 +584,8 @@ void Control::SetBackgroundColor( const Vector4& color )
     Actor actor = CreateBackground(Self(), color );
     background.actor = actor;
     mImpl->mAddRemoveBackgroundChild = true;
-    // use insert to guarantee its the first child (so that OVERLAY_2D mode works)
-    Self().Insert( 0, actor );
+    // The actor does not need to be inserted to guarantee order.
+    Self().Add( actor );
     mImpl->mAddRemoveBackgroundChild = false;
   }
 
@@ -619,8 +619,8 @@ void Control::SetBackgroundImage( Image image )
    // Set the background actor before adding so that we do not inform derived classes
    background.actor = actor;
    mImpl->mAddRemoveBackgroundChild = true;
-   // use insert to guarantee its the first child (so that OVERLAY_2D mode works)
-   Self().Insert( 0, actor );
+   // The actor does not need to be inserted to guarantee order.
+   Self().Add( actor );
    mImpl->mAddRemoveBackgroundChild = false;
 }
 
@@ -875,7 +875,7 @@ void Control::Initialize()
       styleManager.StyleChangeSignal().Connect( this, &Control::OnStyleChange );
 
       // Apply the current style
-      GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) );
+      GetImpl( styleManager ).ApplyThemeStyleAtInit( Toolkit::Control( GetOwner() ) );
     }
   }