ImageActor backgroundColourActor = Dali::Toolkit::CreateSolidColorActor( BACKGROUND_COLOR );
backgroundColourActor.SetAnchorPoint( AnchorPoint::CENTER );
backgroundColourActor.SetParentOrigin( ParentOrigin::CENTER );
- backgroundColourActor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- backgroundColourActor.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ backgroundColourActor.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
backgroundColourActor.SetSizeModeFactor( Vector3( 1.0f, 1.5f, 1.0f ) );
backgroundColourActor.SetZ( BACKGROUND_Z );
mScrollViewLayer.Add( backgroundColourActor );
content.SetAnchorPoint( AnchorPoint::CENTER );
content.SetParentOrigin( ParentOrigin::CENTER );
content.SetRelayoutEnabled( true );
- content.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- content.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ content.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
content.SetSizeModeFactor( sizeMultiplier );
// create background image
text.SetTextAlignment( Toolkit::Alignment::Type( Alignment::HorizontalCenter | Alignment::VerticalCenter ) );
text.SetZ( 1 );
// make the text 90% of tile
- text.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- text.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ text.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
text.SetSizeModeFactor( Vector3( 0.9f, 0.9f, 0.0f ) );
text.SetStyleToCurrentText( GetTableTextStyle() );
text.SetSnapshotModeEnabled( false );
mVersionPopup = Dali::Toolkit::Popup::New();
mVersionPopup.SetParentOrigin( ParentOrigin::CENTER );
mVersionPopup.SetAnchorPoint( AnchorPoint::CENTER );
- mVersionPopup.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- mVersionPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mVersionPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH );
mVersionPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
mVersionPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
mVersionPopup.SetTitle( stream.str() );
radioGroup2Background.SetParentOrigin( ParentOrigin::TOP_LEFT );
radioGroup2Background.SetPosition( DP(MARGIN_SIZE), DP(yPos) );
radioGroup2Background.SetRelayoutEnabled( true );
- radioGroup2Background.SetPreferredSize( Vector2( DP(348), DP(GROUP2_HEIGHT) ) );
+ radioGroup2Background.SetSize( DP(348), DP(GROUP2_HEIGHT) );
mContentLayer.Add( radioGroup2Background );
Actor radioButtonsGroup2 = Actor::New();
radioButtonsGroup2.SetAnchorPoint( AnchorPoint::TOP_LEFT );
radioButtonsGroup2.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );
radioButtonsGroup2.SetRelayoutEnabled( true );
- radioButtonsGroup2.SetPreferredSize( Vector2( DP(100), DP(160) ) );
+ radioButtonsGroup2.SetSize( DP(100), DP(160) );
radioGroup2Background.Add( radioButtonsGroup2 );
// Radio 1
{
ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_1 ) );
- imageActor.SetPreferredSize( Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
+ imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
mRadioButtonImage1 = Dali::Toolkit::RadioButton::New( imageActor );
mRadioButtonImage1.SetParentOrigin( ParentOrigin::TOP_LEFT );
mRadioButtonImage1.SetAnchorPoint( AnchorPoint::TOP_LEFT );
radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING;
ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_2 ) );
- imageActor.SetPreferredSize( Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
+ imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
mRadioButtonImage2 = Dali::Toolkit::RadioButton::New( imageActor );
mRadioButtonImage2.SetParentOrigin( ParentOrigin::TOP_LEFT );
radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING;
ImageActor imageActor = ImageActor::New( ResourceImage::New( SMALL_IMAGE_3 ) );
- imageActor.SetPreferredSize( Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
+ imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
mRadioButtonImage3 = Dali::Toolkit::RadioButton::New( imageActor );
mRadioButtonImage3.SetParentOrigin( ParentOrigin::TOP_LEFT );
mUpdateButton.SetAnchorPoint( AnchorPoint::TOP_CENTER );
mUpdateButton.SetPosition( 0, DP(MARGIN_SIZE) );
mUpdateButton.SetLabel( "Select" );
- mUpdateButton.SetPreferredSize( Vector2( DP(100), DP(BUTTON_HEIGHT) ) );
+ mUpdateButton.SetSize( DP(100), DP(BUTTON_HEIGHT) );
mUpdateButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
mUpdateButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
mImage.SetParentOrigin( ParentOrigin::TOP_RIGHT );
mImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mImage.SetPosition( DP(MARGIN_SIZE), 0 );
- mImage.SetPreferredSize( Vector2( DP(218), DP(218) ) );
+ mImage.SetSize( DP(218), DP(218) );
radioButtonsGroup2.Add( mImage );
// The enable/disable radio group
radioGroup1Background.SetParentOrigin( ParentOrigin::TOP_LEFT );
radioGroup1Background.SetPosition( DP(MARGIN_SIZE), DP(yPos) );
radioGroup1Background.SetRelayoutEnabled( true );
- radioGroup1Background.SetPreferredSize( Vector2( DP(348), DP(GROUP1_HEIGHT) ) );
+ radioGroup1Background.SetSize( DP(348), DP(GROUP1_HEIGHT) );
mContentLayer.Add( radioGroup1Background );
// Radio group
// First radio button
{
Toolkit::TableView tableView = Toolkit::TableView::New( 1, 2 );
- tableView.SetPreferredSize( Vector2( DP(260), 0.0f ) );
+ tableView.SetSize( DP(260), 0.0f );
tableView.SetResizePolicy( USE_NATURAL_SIZE, HEIGHT );
Toolkit::TextView textView = Toolkit::TextView::New( "Select enabled" );
tableView.AddChild( textView, Toolkit::TableView::CellPosition( 0, 0 ) );
ImageActor imageActor = ImageActor::New( ResourceImage::New( ENABLED_IMAGE ) );
- imageActor.SetPreferredSize( Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
+ imageActor.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
imageActor.SetResizePolicy( FIXED, ALL_DIMENSIONS );
imageActor.SetPadding( Padding( DP(20.0f), 0.0f, 0.0f, 0.0f ) );
tableView.AddChild( imageActor, Toolkit::TableView::CellPosition( 0, 1 ) );
checkBoxBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );
checkBoxBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );
checkBoxBackground.SetRelayoutEnabled( true );
- checkBoxBackground.SetPreferredSize( Vector2( DP(430), DP(GROUP3_HEIGHT) ) );
+ checkBoxBackground.SetSize( DP(430), DP(GROUP3_HEIGHT) );
mContentLayer.Add( checkBoxBackground );
Dali::Image unselected = Dali::ResourceImage::New( CHECKBOX_UNSELECTED_IMAGE );
toggleBackground.SetParentOrigin( ParentOrigin::TOP_LEFT );
toggleBackground.SetPosition( DP(MARGIN_SIZE), DP(yPos) );
toggleBackground.SetRelayoutEnabled( true );
- toggleBackground.SetPreferredSize( Vector2( DP(150 + MARGIN_SIZE * 2), DP(GROUP4_HEIGHT) ) );
+ toggleBackground.SetSize( DP(150 + MARGIN_SIZE * 2), DP(GROUP4_HEIGHT) );
mContentLayer.Add( toggleBackground );
Toolkit::PushButton toggleButton = Toolkit::PushButton::New();
toggleButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
toggleButton.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );
toggleButton.SetLabel( "Unselected" );
- toggleButton.SetPreferredSize( Vector2( DP(150), DP(BUTTON_HEIGHT) ) );
+ toggleButton.SetSize( DP(150), DP(BUTTON_HEIGHT) );
toggleButton.SetSelectedImage( Dali::ResourceImage::New( PUSHBUTTON_PRESS_IMAGE ) );
toggleButton.SetDisabledImage( Dali::ResourceImage::New( PUSHBUTTON_DISABLED_IMAGE ) );
shadowActor.SetPosition(Vector3(0.0f, 0.0f, -1.0f));
// Apply size-relative mode to auto-size the image shadow
- shadowActor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- shadowActor.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ shadowActor.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
shadowActor.SetSizeModeFactor( ShadowProperty::SIZE_SCALE );
actor.Add( shadowActor );
borderActor.SetStyle( ImageActor::STYLE_NINE_PATCH );
borderActor.SetNinePatchBorder( CLUSTER_IMAGE_BORDER_ABSOLUTE );
borderActor.SetPosition( Vector3( 0.0f, 0.0f, 1.0f ) );
- borderActor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- borderActor.SetSizeMode( SIZE_FIXED_OFFSET_FROM_PARENT );
+ borderActor.SetResizePolicy( SIZE_FIXED_OFFSET_FROM_PARENT, ALL_DIMENSIONS );
borderActor.SetSizeModeFactor( Vector3( CLUSTER_IMAGE_BORDER_INDENT - 1.0f, CLUSTER_IMAGE_BORDER_INDENT - 1.0f, 0.0f ) * 2.0f );
actor.Add( borderActor );
// show the first image
mCurrentImage = ImageActor::New( LoadStageFillingImage( IMAGES[mIndex] ) );
+ mCurrentImage.SetRelayoutEnabled( false );
mCurrentImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
mCurrentImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
mCurrentImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO );
Image image = LoadStageFillingImage( IMAGES[ mIndex ] );
mNextImage = ImageActor::New( image );
+ mNextImage.SetRelayoutEnabled( false );
mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
mNextImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
mNextImage.SetSizeScalePolicy( FIT_WITH_ASPECT_RATIO );
mDeleteButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
mDeleteButton.SetDrawMode( DrawMode::OVERLAY );
- mDeleteButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
mDeleteButton.SetButtonImage( ResourceImage::New( DELETE_IMAGE ) );
- mDeleteButton.SetResizePolicy( FIXED, ALL_DIMENSIONS );
- mDeleteButton.SetPreferredSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) );
+ mDeleteButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
+ mDeleteButton.SetSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) );
mDeleteButton.ClickedSignal().Connect( this, &ItemViewExample::OnDeleteButtonClicked);
mDeleteButton.SetLeaveRequired( true );
mDeleteButton.SetVisible( false );
mInsertButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
mInsertButton.SetDrawMode( DrawMode::OVERLAY );
- mInsertButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
mInsertButton.SetButtonImage( ResourceImage::New( INSERT_IMAGE ) );
- mInsertButton.SetResizePolicy( FIXED, ALL_DIMENSIONS );
- mInsertButton.SetPreferredSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) );
+ mInsertButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
+ mInsertButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f );
mInsertButton.ClickedSignal().Connect( this, &ItemViewExample::OnInsertButtonClicked);
mInsertButton.SetLeaveRequired( true );
mInsertButton.SetVisible( false );
mReplaceButton.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
mReplaceButton.SetDrawMode( DrawMode::OVERLAY );
- mReplaceButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
mReplaceButton.SetButtonImage( ResourceImage::New( REPLACE_IMAGE ) );
- mReplaceButton.SetResizePolicy( FIXED, ALL_DIMENSIONS );
- mReplaceButton.SetPreferredSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) );
+ mReplaceButton.SetBackgroundImage( ResourceImage::New( TOOLBAR_IMAGE ) );
+ mReplaceButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f );
mReplaceButton.ClickedSignal().Connect( this, &ItemViewExample::OnReplaceButtonClicked);
mReplaceButton.SetLeaveRequired( true );
mReplaceButton.SetVisible( false );
borderActor.SetStyle( ImageActor::STYLE_NINE_PATCH );
borderActor.SetNinePatchBorder( Vector4( ITEM_IMAGE_BORDER_LEFT, ITEM_IMAGE_BORDER_TOP, ITEM_IMAGE_BORDER_RIGHT, ITEM_IMAGE_BORDER_BOTTOM ) );
borderActor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR ); // darken with parent image-actor
- borderActor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- borderActor.SetSizeMode( SIZE_FIXED_OFFSET_FROM_PARENT );
+ borderActor.SetResizePolicy( SIZE_FIXED_OFFSET_FROM_PARENT, ALL_DIMENSIONS );
borderActor.SetSizeModeFactor( ITEM_BORDER_MARGIN_SIZE );
actor.Add(borderActor);
actor.SetKeyboardFocusable( true );
mMenu = Toolkit::Popup::New();
mMenu.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
mMenu.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
- mMenu.SetResizePolicy( FIXED, ALL_DIMENSIONS );
- mMenu.SetPreferredSize( Vector2( popupWidth, MENU_OPTION_HEIGHT * 2 ) );
+ mMenu.SetSize( popupWidth, MENU_OPTION_HEIGHT * 2 );
mMenu.OutsideTouchedSignal().Connect( this, &ItemViewExample::HideMenu );
TableView tableView = TableView::New( 0, 0 );
text.SetTextAlignment( Dali::Toolkit::Alignment::HorizontalLeft );
text.SetStyleToCurrentText( defaultTextStyle );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetResizePolicy( FIXED, HEIGHT );
- text.SetPreferredSize( Vector2( 0.0f, LABEL_TEXT_SIZE_Y ) );
+ text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y );
text.SetZ( -0.9f );
slider.Add( text );
text.SetTextAlignment( Dali::Toolkit::Alignment::HorizontalLeft );
text.SetStyleToCurrentText( defaultTextStyle );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetResizePolicy( FIXED, HEIGHT );
- text.SetPreferredSize( Vector2( 0.0f, LABEL_TEXT_SIZE_Y ) );
+ text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y );
textContainer.Add( text );
mMenu.MarkDirtyForRelayout();
Image dial = ResourceImage::New( TEST_DIAL_FILENAME );
mDialActor = ImageActor::New( dial );
+ mDialActor.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );
mDialActor.SetPositionInheritanceMode(USE_PARENT_POSITION);
mDialActor.SetScale(scale);
Layer dialLayer = Layer::New();
mImageActor = ImageActor::New(image);
mImageActor.SetParentOrigin(ParentOrigin::CENTER);
mImageActor.SetAnchorPoint(AnchorPoint::CENTER);
+ mImageActor.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );
// Create the stencil
Vector2 imageSize = ResourceImage::GetImageSize(imageName);
mImageActor2 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_2) );
mImageActor3 = ImageActor::New( ResourceImage::New(SCENE_IMAGE_3) );
+ mImageActor1.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );
+ mImageActor2.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );
+ mImageActor3.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );
mImageActor2.SetParentOrigin(ParentOrigin::CENTER);
mMenu.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mMenu.HideTail();
mMenu.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::HideMenu );
- mMenu.SetPreferredSize( Vector2( popupWidth, 0.0f ) );
+ mMenu.SetSize( popupWidth, 0.0f );
mMenu.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
Toolkit::TableView tableView = Toolkit::TableView::New( 0, 0 );
popup.SetName( "POPUP" );
popup.SetParentOrigin( ParentOrigin::CENTER );
popup.SetAnchorPoint( AnchorPoint::CENTER );
- popup.SetPreferredSize( Vector2( POPUP_WIDTH_DP, 0.0f ) );
+ popup.SetSize( POPUP_WIDTH_DP, 0.0f );
popup.HideTail();
popup.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::OnPopupOutsideTouched );
text.SetWidthExceedPolicy( Toolkit::TextView::Split );
text.SetLineJustification( Toolkit::TextView::Center );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetDimensionDependency( HEIGHT, WIDTH );
+ text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( text );
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
image.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- image.SetDimensionDependency( HEIGHT, WIDTH );
+ image.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
image.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( image );
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE2 ) );
text.SetWidthExceedPolicy( Toolkit::TextView::Split );
text.SetLineJustification( Toolkit::TextView::Center );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetDimensionDependency( HEIGHT, WIDTH );
+ text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
text.SetPadding( Padding( 20.0f, 20.0f, 20.0f, 20.0f ) );
mPopup.Add( text );
text.SetWidthExceedPolicy( Toolkit::TextView::Split );
text.SetLineJustification( Toolkit::TextView::Left );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetDimensionDependency( HEIGHT, WIDTH );
+ text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
text.SetPadding( Padding( 10.0f, 10.0f, 20.0f, 0.0f ) );
mPopup.Add( text );
text.SetWidthExceedPolicy( Toolkit::TextView::Split );
text.SetLineJustification( Toolkit::TextView::Left );
text.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- text.SetDimensionDependency( HEIGHT, WIDTH );
+ text.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
content.AddChild( text, Toolkit::TableView::CellPosition( 0, 0 ) );
}
ImageActor image = ImageActor::New( ResourceImage::New( IMAGE1 ) );
image.SetName( "COMPLEX_IMAGE" );
image.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- image.SetDimensionDependency( HEIGHT, WIDTH );
+ image.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
image.SetPadding( Padding( 20.0f, 0.0f, 0.0f, 0.0f ) );
content.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) );
}
Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New();
checkBox.SetBackgroundImage( unchecked );
checkBox.SetSelectedImage( checked );
- checkBox.SetPreferredSize( Vector2( 48, 48 ) );
- checkBox.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ checkBox.SetSize( 48, 48 );
root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) );
else if( button.GetName() == TABLEVIEW_BUTTON_EMPTY_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
else if( button.GetName() == TABLEVIEW_BUTTON_1CELL_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
else if( button.GetName() == TABLEVIEW_BUTTON_3CELL_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
else if( button.GetName() == TABLEVIEW_BUTTON_3X3CELL_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
else if( button.GetName() == TABLEVIEW_BUTTON_FIXED1_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
else if( button.GetName() == TABLEVIEW_BUTTON_FIXED2_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
else if( button.GetName() == TABLEVIEW_BUTTON_FIT1_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 100.0f ) );
+ backing.SetSize( 0.0f, 100.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 100.0f ) );
+ backing.SetSize( 0.0f, 100.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
else if( button.GetName() == TABLEVIEW_BUTTON_FIT2_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, ALL_DIMENSIONS );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
-
Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
table.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
table.SetFitHeight( 1 );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 200.0f ) );
+ backing.SetSize( 0.0f, 200.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL1_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 100.0f ) );
+ backing.SetSize( 0.0f, 100.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 200.0f ) );
+ backing.SetSize( 0.0f, 200.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 300.0f ) );
+ backing.SetSize( 0.0f, 300.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL2_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 100.0f ) );
+ backing.SetSize( 0.0f, 100.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 200.0f ) );
+ backing.SetSize( 0.0f, 200.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL3_ID )
{
mPopup = CreatePopup();
- mPopup.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- mPopup.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mPopup.SetResizePolicy( SIZE_RELATIVE_TO_PARENT, WIDTH );
mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
mPopup.SetResizePolicy( FIT_TO_CHILDREN, HEIGHT );
{
Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( FILL_TO_PARENT, WIDTH );
- backing.SetResizePolicy( FIXED, HEIGHT );
- backing.SetPreferredSize( Vector2( 0.0f, 200.0f ) );
+ backing.SetSize( 0.0f, 200.0f );
TextActor text = TextActor::New( "Fit" );
text.SetAnchorPoint( AnchorPoint::CENTER );
textContainer.SetParentOrigin( ParentOrigin::TOP_LEFT );
textContainer.SetAnchorPoint( AnchorPoint::TOP_LEFT );
textContainer.SetPosition( 0, TOOLBAR_HEIGHT );
- textContainer.SetPreferredSize( Vector2( stage.GetSize().width, stage.GetSize().height - TOOLBAR_HEIGHT ) );
+ textContainer.SetSize( stage.GetSize().width, stage.GetSize().height - TOOLBAR_HEIGHT );
mContentLayer.Add( textContainer );
toolBarLayer.SetName( "TOOLBAR_LAYER" );
toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER );
toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER );
- toolBarLayer.SetPreferredSize( Dali::Vector2( 0.0f, style.mToolBarHeight ) );
+ toolBarLayer.SetSize( 0.0f, style.mToolBarHeight );
toolBarLayer.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::WIDTH );
- toolBarLayer.SetResizePolicy( Dali::FIXED, Dali::HEIGHT );
// Raise tool bar layer to the top.
toolBarLayer.RaiseToTop();