X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fpush-button-impl.cpp;h=4331c873165112723bcef3c4566601606d6ccc81;hp=7a8ec5d33c48be157e341b36b1fd9d9426d81007;hb=a073ebfd862b49692c8e6d7dff2b128e62a4f6df;hpb=06e563f8a982e25a0efe2d91c794657dc8e4bc4a diff --git a/dali-toolkit/internal/controls/buttons/push-button-impl.cpp b/dali-toolkit/internal/controls/buttons/push-button-impl.cpp index 7a8ec5d..4331c87 100644 --- a/dali-toolkit/internal/controls/buttons/push-button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/push-button-impl.cpp @@ -53,11 +53,11 @@ BaseHandle Create() DALI_TYPE_REGISTRATION_BEGIN( Toolkit::PushButton, Toolkit::Button, Create ) -DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "unselected-icon", STRING, UNSELECTED_ICON ) -DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "selected-icon", STRING, SELECTED_ICON ) -DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "icon-alignment", STRING, ICON_ALIGNMENT ) -DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "label-padding", STRING, LABEL_PADDING ) -DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "icon-padding", STRING, ICON_PADDING ) +DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "unselectedIcon", STRING, UNSELECTED_ICON ) +DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "selectedIcon", STRING, SELECTED_ICON ) +DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "iconAlignment", STRING, ICON_ALIGNMENT ) +DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "labelPadding", STRING, LABEL_PADDING ) +DALI_PROPERTY_REGISTRATION( Toolkit, PushButton, "iconPadding", STRING, ICON_PADDING ) DALI_TYPE_REGISTRATION_END() @@ -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;