Button SetLabel padding fix
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / buttons / push-button-impl.cpp
index 7a8ec5d..b168916 100644 (file)
@@ -273,12 +273,17 @@ Property::Value PushButton::GetProperty( BaseObject* object, Property::Index pro
   return value;
 }
 
-void PushButton::OnLabelSet()
+void PushButton::OnLabelSet( bool noPadding )
 {
   Actor& label = GetLabelActor();
 
   if( label )
   {
+    if( noPadding )
+    {
+      mLabelPadding = Padding( 0.0f, 0.0f, 0.0f, 0.0f );
+    }
+
     Toolkit::TextLabel textLabel = Toolkit::TextLabel::DownCast( label );
     if( textLabel )
     {
@@ -557,6 +562,7 @@ void PushButton::ConfigureSizeNegotiation()
   RelayoutRequest();
 }
 
+
 void PushButton::ConfigureSizeNegotiationDimension( Dimension::Type dimension, const std::vector< Actor >& images, Actor& label )
 {
   ResizePolicy::Type imageResizePolicy = ResizePolicy::FILL_TO_PARENT;