if( policyDimension == Dimension::WIDTH )
{
stageDimensionSize = stageSize.x;
- sizeModeFactor = popup.GetSizeModeFactor().x;
+ sizeModeFactor = popup.GetProperty< Vector3 >( Actor::Property::SIZE_MODE_FACTOR ).x;
}
else
{
stageDimensionSize = stageSize.y;
- sizeModeFactor = popup.GetSizeModeFactor().y;
+ sizeModeFactor = popup.GetProperty< Vector3 >( Actor::Property::SIZE_MODE_FACTOR ).y;
}
bool modifyPolicy = false;
if( modifySize )
{
// The size is set once at the end.
- popup.SetSize( Vector2( newSize[ 0 ], newSize[ 1 ] ) );
+ popup.SetProperty( Actor::Property::SIZE, Vector2( newSize[ 0 ], newSize[ 1 ] ) );
}
}
popup.SetProperty( Dali::Actor::Property::NAME, "popup" );
popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- popup.SetSize( POPUP_WIDTH_DP, 0.0f );
+ popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) );
popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false );
popup.OutsideTouchedSignal().Connect( this, &PopupExample::HidePopup );
// Set up the container's layout.
footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
- footer.SetSize( 0.0f, 130.0f );
+ footer.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 130.0f ) );
footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
footer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
okButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
okButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
okButton.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
- okButton.SetSizeModeFactor( Vector3( -20.0f, -20.0f, 0.0 ) );
+ okButton.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( -20.0f, -20.0f, 0.0 ) );
if( numberOfButtons > 1 )
{
cancelButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
cancelButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
cancelButton.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
- cancelButton.SetSizeModeFactor( Vector3( -20.0f, -20.0f, 0.0 ) );
+ cancelButton.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( -20.0f, -20.0f, 0.0 ) );
controlLayout.SetCellPadding( Size( 10.0f, 10.0f ) );
text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
text.SetProperty( TextLabel::Property::MULTI_LINE, true );
- text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) );
+ text.SetProperty( Actor::Property::PADDING, Padding( 10.0f, 10.0f, 20.0f, 0.0f ) );
mPopup.SetContent( text );
SetupPopup( mPopup, button );
text.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
- text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
+ text.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( text );
Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE2 );
image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
- image.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
+ image.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( image );
text.SetProperty( TextLabel::Property::MULTI_LINE, true );
text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
- text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
+ text.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( text );
text.SetProperty( Dali::Actor::Property::NAME, "POPUP_CONTENT_TEXT" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
text.SetProperty( TextLabel::Property::MULTI_LINE, true );
- text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
+ text.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( text );
// Fix the popup's size.
- mPopup.SetSize( 240.0f, 400.0f );
+ mPopup.SetProperty( Actor::Property::SIZE, Vector2( 240.0f, 400.0f ) );
mPopup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
SetupPopup( mPopup, button );
text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
text.SetProperty( TextLabel::Property::MULTI_LINE, true );
- text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) );
+ text.SetProperty( Actor::Property::PADDING, Padding( 10.0f, 10.0f, 20.0f, 0.0f ) );
mPopup.Add( text );
content.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
content.SetFitHeight( 0 );
content.SetFitHeight( 1 );
- content.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 0.0f ) );
+ content.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 20.0f, 20.0f, 0.0f ) );
// Text
{
image.SetProperty( Dali::Actor::Property::NAME, "COMPLEX_IMAGE" );
image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
image.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
- image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) );
+ image.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 0.0f, 0.0f, 0.0f ) );
content.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) );
}
root.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
root.SetFitHeight( 0 );
root.SetFitWidth( 0 );
- root.SetPadding( Padding( 0.0f, 0.0f, 0.0f, 20.0f ) );
+ root.SetProperty( Actor::Property::PADDING, Padding( 0.0f, 0.0f, 0.0f, 20.0f ) );
Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New();
- checkBox.SetSize( 48, 48 );
+ checkBox.SetProperty( Actor::Property::SIZE, Vector2( 48, 48 ) );
root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Don't show again" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
Actor textActor = text;
- textActor.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 10.0f ) );
+ textActor.SetProperty( Actor::Property::PADDING, Padding( 20.0f, 0.0f, 0.0f, 10.0f ) );
root.AddChild( text, Toolkit::TableView::CellPosition( 0, 1 ) );