Commit b5dd37e2d779b365ce9719c821da18bab284bcc1

Authored by Kimmo Hoikka
Committed by Gerrit Code Review
2 parents 1801f93b 79ca1d50

Merge "Size negotiation patch 4: Remove SetRelayoutEnabled" into tizen

demo/dali-table-view.cpp
... ... @@ -123,21 +123,21 @@ const float IMAGE_BORDER_BOTTOM = IMAGE_BORDER_LEFT;
123 123 struct AnimateBubbleConstraint
124 124 {
125 125 public:
126   - AnimateBubbleConstraint( const Vector3& initialPos, float scale, float size )
  126 + AnimateBubbleConstraint( const Vector3& initialPos, float scale )
127 127 : mInitialX( initialPos.x ),
128   - mScale( scale ),
129   - mShapeSize( size )
  128 + mScale( scale )
130 129 {
131 130 }
132 131  
133 132 void operator()( Vector3& position, const PropertyInputContainer& inputs )
134 133 {
135 134 const Vector3& parentSize = inputs[1]->GetVector3();
  135 + const Vector3& childSize = inputs[2]->GetVector3();
136 136  
137 137 // Wrap bubbles verically.
138   - if( position.y + mShapeSize * 0.5f < -parentSize.y * 0.5f )
  138 + if( position.y + childSize.y * 0.5f < -parentSize.y * 0.5f )
139 139 {
140   - position.y = parentSize.y * 0.5f + mShapeSize * 0.5f;
  140 + position.y = parentSize.y * 0.5f + childSize.y * 0.5f;
141 141 }
142 142  
143 143 // Bubbles X position moves parallax to horizontal
... ... @@ -267,7 +267,6 @@ void DaliTableView::Initialize( Application&amp; application )
267 267  
268 268 // scrollview occupying the majority of the screen
269 269 mScrollView = ScrollView::New();
270   - mScrollView.SetRelayoutEnabled( true );
271 270  
272 271 mScrollView.SetAnchorPoint( AnchorPoint::CENTER );
273 272 mScrollView.SetParentOrigin( ParentOrigin::CENTER );
... ... @@ -297,7 +296,6 @@ void DaliTableView::Initialize( Application&amp; application )
297 296  
298 297 // Populate background and bubbles - needs to be scrollViewLayer so scroll ends show
299 298 Actor bubbleContainer = Actor::New();
300   - bubbleContainer.SetRelayoutEnabled( true );
301 299 bubbleContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
302 300 bubbleContainer.SetAnchorPoint( AnchorPoint::CENTER );
303 301 bubbleContainer.SetParentOrigin( ParentOrigin::CENTER );
... ... @@ -492,7 +490,6 @@ Actor DaliTableView::CreateTile( const std::string&amp; name, const std::string&amp; tit
492 490 content.SetName( name );
493 491 content.SetAnchorPoint( AnchorPoint::CENTER );
494 492 content.SetParentOrigin( ParentOrigin::CENTER );
495   - content.SetRelayoutEnabled( true );
496 493 content.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
497 494 content.SetSizeModeFactor( sizeMultiplier );
498 495  
... ... @@ -746,19 +743,18 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor )
746 743 {
747 744 Actor child = actor.GetChildAt( i );
748 745  
749   - const Vector3 childSize = child.GetTargetSize();
750   -
751 746 // Calculate a random position
752 747 Vector3 childPos( Random::Range( -size.x * 0.5f * BACKGROUND_SPREAD_SCALE, size.x * 0.5f * BACKGROUND_SPREAD_SCALE ),
753   - Random::Range( -size.y * 0.5f - childSize.height, size.y * 0.5f + childSize.height ),
  748 + Random::Range( -size.y, size.y ),
754 749 Random::Range( BUBBLE_MIN_Z, BUBBLE_MAX_Z ) );
755 750  
756 751 child.SetPosition( childPos );
757 752  
758 753 // Define bubble horizontal parallax and vertical wrapping
759   - Constraint animConstraint = Constraint::New < Vector3 > ( child, Actor::Property::POSITION, AnimateBubbleConstraint( childPos, Random::Range( -0.85f, 0.25f ), childSize.height ) );
  754 + Constraint animConstraint = Constraint::New < Vector3 > ( child, Actor::Property::POSITION, AnimateBubbleConstraint( childPos, Random::Range( -0.85f, 0.25f ) ) );
760 755 animConstraint.AddSource( Source( mScrollView, ScrollView::Property::SCROLL_POSITION ) );
761 756 animConstraint.AddSource( Dali::ParentSource( Dali::Actor::Property::SIZE ) );
  757 + animConstraint.AddSource( Dali::LocalSource( Dali::Actor::Property::SIZE ) );
762 758 animConstraint.Apply();
763 759  
764 760 // Kickoff animation
... ... @@ -779,7 +775,6 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis
779 775 Vector4 randColour( hue, hue * 0.5, 0.0f, Random::Range( 0.3f, 0.6f ));
780 776  
781 777 ImageActor dfActor = ImageActor::New( distanceField );
782   - dfActor.SetRelayoutEnabled( false );
783 778 dfActor.SetSize( Vector2( randSize, randSize ) );
784 779 dfActor.SetParentOrigin( ParentOrigin::CENTER );
785 780  
... ... @@ -885,7 +880,7 @@ void DaliTableView::PauseAnimation()
885 880 {
886 881 Animation anim = *animIter;
887 882  
888   - anim.Pause();
  883 + anim.Stop();
889 884 }
890 885  
891 886 mBackgroundAnimsPlaying = false;
... ... @@ -1008,8 +1003,6 @@ void DaliTableView::OnLogoTapped( Dali::Actor actor, const Dali::TapGesture&amp; tap
1008 1003 mVersionPopup.HideTail();
1009 1004 mVersionPopup.OutsideTouchedSignal().Connect( this, &DaliTableView::HideVersionPopup );
1010 1005 mVersionPopup.HiddenSignal().Connect( this, &DaliTableView::PopupHidden );
1011   -
1012   - mVersionPopup.MarkDirtyForRelayout();
1013 1006 }
1014 1007  
1015 1008 mVersionPopup.Show();
... ...
examples/blocks/blocks-example.cpp
... ... @@ -358,8 +358,8 @@ private:
358 358 mLevelContainer = Actor::New();
359 359 mLevelContainer.SetAnchorPoint( AnchorPoint::CENTER );
360 360 mLevelContainer.SetParentOrigin( ParentOrigin::CENTER );
361   - mLevelContainer.SetRelayoutEnabled( true );
362 361 mLevelContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  362 +
363 363 mContentLayer.Add( mLevelContainer );
364 364  
365 365 mBrickCount = 0;
... ... @@ -528,7 +528,6 @@ private:
528 528 ImageActor brick = ImageActor::New(img);
529 529 brick.SetParentOrigin(ParentOrigin::TOP_LEFT);
530 530 brick.SetAnchorPoint(AnchorPoint::CENTER);
531   - brick.SetRelayoutEnabled( false );
532 531 brick.SetSize( brickSize );
533 532 brick.SetPosition( Vector3( position ) );
534 533  
... ... @@ -560,7 +559,6 @@ private:
560 559 ImageActor actor = ImageActor::New(img);
561 560 actor.SetParentOrigin(ParentOrigin::TOP_LEFT);
562 561 actor.SetAnchorPoint(AnchorPoint::CENTER);
563   - actor.SetRelayoutEnabled( false );
564 562 return actor;
565 563 }
566 564  
... ...
examples/builder/examples.cpp
... ... @@ -287,7 +287,6 @@ public:
287 287 mFiles.clear();
288 288  
289 289 mItemView = ItemView::New(*this);
290   - mItemView.SetRelayoutEnabled( false );
291 290 stage.Add( mItemView );
292 291 mItemView.SetParentOrigin(ParentOrigin::CENTER);
293 292 mItemView.SetAnchorPoint(AnchorPoint::CENTER);
... ... @@ -469,9 +468,6 @@ public:
469 468 }
470 469  
471 470 builder.AddActors( layer );
472   -
473   - // Force relayout on layer
474   - layer.RelayoutRequestTree();
475 471 }
476 472  
477 473  
... ...
examples/buttons/buttons-example.cpp
... ... @@ -214,8 +214,8 @@ class ButtonsController: public ConnectionTracker
214 214 mBigImage3 = ResourceImage::New( BIG_IMAGE_3 );
215 215  
216 216 mImage = ImageActor::New( mBigImage1 );
217   - mImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
218   - mImage.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH );
  217 + mImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
  218 + mImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
219 219 radioGroup2Background.AddChild( mImage, Toolkit::TableView::CellPosition( 0, 1, 2, 1 ) );
220 220  
221 221 // The enable/disable radio group
... ... @@ -349,7 +349,6 @@ class ButtonsController: public ConnectionTracker
349 349  
350 350 contentTable.Add( toggleBackground );
351 351  
352   -
353 352 Toolkit::PushButton toggleButton = Toolkit::PushButton::New();
354 353 toggleButton.SetTogglableButton( true );
355 354 toggleButton.SetLabel( "Unselected" );
... ...
examples/cluster/cluster-example.cpp
... ... @@ -477,7 +477,6 @@ public:
477 477  
478 478 // create and setup the scroll view...
479 479 mScrollView = ScrollView::New();
480   - mScrollView.SetRelayoutEnabled( false );
481 480 mScrollView.SetSize(stageSize);
482 481  
483 482 // attach Wobble Effect to ScrollView
... ... @@ -489,7 +488,6 @@ public:
489 488 mScrollView.SetParentOrigin(ParentOrigin::CENTER);
490 489  
491 490 // Scale ScrollView to fit parent (mContentLayer)
492   - mScrollView.SetRelayoutEnabled( true );
493 491 mScrollView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
494 492  
495 493 // Add the scroll view to the content layer
... ... @@ -511,17 +509,20 @@ public:
511 509 /**
512 510 * Helper to create the cluster actors
513 511 */
514   - Cluster CreateClusterActor(ClusterType clusterType, ClusterStyle style)
  512 + Cluster CreateClusterActor(ClusterType clusterType, ClusterStyle style, Vector3& clusterSize)
515 513 {
516 514 // Create the cluster actor with the given cluster style
517 515 Cluster clusterActor = Cluster::New(style);
518 516 clusterActor.SetParentOrigin(ParentOrigin::CENTER);
519 517 clusterActor.SetAnchorPoint(AnchorPoint::CENTER);
520   - clusterActor.SetRelayoutEnabled( false );
521 518  
522 519 Vector2 stageSize = Dali::Stage::GetCurrent().GetSize();
523 520 float minStageDimension = std::min(stageSize.x, stageSize.y);
524   - clusterActor.SetSize(minStageDimension * CLUSTER_RELATIVE_SIZE, minStageDimension * CLUSTER_RELATIVE_SIZE, 0.0f);
  521 +
  522 + clusterSize.x = minStageDimension * CLUSTER_RELATIVE_SIZE;
  523 + clusterSize.y = minStageDimension * CLUSTER_RELATIVE_SIZE;
  524 +
  525 + clusterActor.SetSize( clusterSize );
525 526  
526 527 DALI_ASSERT_ALWAYS(clusterType < CLUSTER_COUNT);
527 528 const char **paths = IMAGE_GROUPS[clusterType];
... ... @@ -532,7 +533,6 @@ public:
532 533 // filter mode:
533 534 Image bg = ResourceImage::New( CLUSTER_BACKGROUND_IMAGE_PATH, Dali::ImageDimensions( stageSize.x * 0.5f, stageSize.y * 0.5f ), Dali::FittingMode::SHRINK_TO_FIT, Dali::SamplingMode::BOX );
534 535 ImageActor image = ImageActor::New(bg);
535   - image.SetRelayoutEnabled( false );
536 536 clusterActor.SetBackgroundImage(image);
537 537  
538 538 // Add actors (pictures) as the children of the cluster
... ... @@ -622,19 +622,18 @@ public:
622 622 mScrollView.Add(pageView);
623 623 pageView.SetParentOrigin(ParentOrigin::CENTER);
624 624 pageView.SetPosition(Vector3(stageSize.width * column, 0.0f, 0.0f));
625   - pageView.SetRelayoutEnabled( true );
626 625 pageView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
627 626  
628 627 // Create cluster actors, add them to scroll view, and set the shear effect with the given center point.
629   - Cluster cluster = CreateClusterActor(clusterType, style);
  628 + Vector3 clusterSize;
  629 + Cluster cluster = CreateClusterActor( clusterType, style, clusterSize );
630 630 cluster.SetParentOrigin(ParentOrigin::TOP_LEFT);
631 631 cluster.SetAnchorPoint(AnchorPoint::TOP_LEFT);
632 632 cluster.SetPosition( clusterPosition );
633 633  
634 634 pageView.Add(cluster);
635   - Vector3 clusterSize = cluster.GetCurrentSize();
636 635  
637   - mClusterInfo.push_back(ClusterInfo( cluster, mClusterCount, clusterPosition, clusterSize ));
  636 + mClusterInfo.push_back( ClusterInfo( cluster, mClusterCount, clusterPosition, clusterSize ) );
638 637  
639 638 mClusterCount++;
640 639 }
... ...
examples/cube-transition-effect/cube-transition-effect-example.cpp
... ... @@ -326,7 +326,6 @@ void CubeTransitionApp::GoToNextImage()
326 326 mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION);
327 327 mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
328 328 mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
329   - mNextImage.SetRelayoutEnabled( false );
330 329 mCurrentEffect.SetTargetImage(mNextImage);
331 330 if( image.GetLoadingState() == ResourceLoadingSucceeded )
332 331 {
... ...
examples/dissolve-effect/dissolve-effect-example.cpp
... ... @@ -250,7 +250,6 @@ void DissolveEffectApp::OnInit( Application&amp; application )
250 250  
251 251 // show the first image
252 252 mCurrentImage = ImageActor::New( LoadStageFillingImage( IMAGES[mIndex] ) );
253   - mCurrentImage.SetRelayoutEnabled( false );
254 253 mCurrentImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
255 254 mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
256 255 mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
... ... @@ -281,7 +280,6 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture&amp; gesture )
281 280  
282 281 Image image = LoadStageFillingImage( IMAGES[ mIndex ] );
283 282 mNextImage = ImageActor::New( image );
284   - mNextImage.SetRelayoutEnabled( false );
285 283 mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION);
286 284 mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
287 285 mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
... ...
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
... ... @@ -419,7 +419,6 @@ public:
419 419 // coordinates in a frame defined by a parent actor:
420 420  
421 421 Actor gridActor = Actor::New();
422   - gridActor.SetRelayoutEnabled( true );
423 422 gridActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
424 423 gridActor.SetParentOrigin( ParentOrigin::CENTER );
425 424 gridActor.SetAnchorPoint( AnchorPoint::CENTER );
... ...
examples/item-view/item-view-example.cpp
... ... @@ -314,7 +314,6 @@ public:
314 314 // Create the item view actor
315 315 mImageAtlas = CreateImageAtlas();
316 316 mItemView = ItemView::New(*this);
317   - mItemView.SetRelayoutEnabled( false );
318 317 mItemView.SetParentOrigin(ParentOrigin::CENTER);
319 318 mItemView.SetAnchorPoint(AnchorPoint::CENTER);
320 319  
... ... @@ -905,7 +904,6 @@ public: // From ItemFactory
905 904 // Add a checkbox child actor; invisible until edit-mode is enabled
906 905  
907 906 ImageActor checkbox = ImageActor::New( mWhiteImage );
908   - checkbox.SetRelayoutEnabled( false );
909 907 checkbox.SetName( "CheckBox" );
910 908 checkbox.SetColor( Vector4(0.0f,0.0f,0.0f,0.6f) );
911 909 checkbox.SetParentOrigin( ParentOrigin::TOP_RIGHT );
... ... @@ -922,7 +920,6 @@ public: // From ItemFactory
922 920 actor.Add( checkbox );
923 921  
924 922 ImageActor tick = ImageActor::New( ResourceImage::New(SELECTED_IMAGE) );
925   - tick.SetRelayoutEnabled( false );
926 923 tick.SetColorMode( USE_OWN_COLOR );
927 924 tick.SetName( "Tick" );
928 925 tick.SetParentOrigin( ParentOrigin::TOP_RIGHT );
... ... @@ -1010,7 +1007,6 @@ private:
1010 1007 slider.Add( text );
1011 1008  
1012 1009 Actor textContainer = Actor::New();
1013   - textContainer.SetRelayoutEnabled( true );
1014 1010 textContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
1015 1011 mAlphaFunctionText = TextLabel::New( ALPHA_FUNCTIONS_TEXT[mAlphaFuncIndex] );
1016 1012 mAlphaFunctionText.SetAnchorPoint( ParentOrigin::CENTER );
... ... @@ -1029,7 +1025,6 @@ private:
1029 1025 text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y );
1030 1026 textContainer.Add( text );
1031 1027  
1032   - mMenu.MarkDirtyForRelayout();
1033 1028 mMenu.Show();
1034 1029 mMenuShown = true;
1035 1030 }
... ...
examples/magnifier/magnifier-example.cpp
... ... @@ -219,14 +219,12 @@ public:
219 219  
220 220 // Create magnifier (controlled by human touch)
221 221 Layer overlay = Layer::New();
222   - overlay.SetRelayoutEnabled( false );
223 222 overlay.SetSensitive(false);
224 223 overlay.SetParentOrigin( ParentOrigin::CENTER );
225 224 overlay.SetSize(mStageSize);
226 225 Stage::GetCurrent().Add(overlay);
227 226  
228 227 mMagnifier = Toolkit::Magnifier::New();
229   - mMagnifier.SetRelayoutEnabled( false );
230 228 mMagnifier.SetSourceActor( mView.GetBackgroundLayer() );
231 229 mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
232 230 mMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR );
... ... @@ -234,7 +232,7 @@ public:
234 232 overlay.Add( mMagnifier );
235 233  
236 234 // Apply constraint to animate the position of the magnifier.
237   - Constraint constraint = Constraint::New<Vector3>( mMagnifier, Actor::Property::POSITION, ConfinementConstraint(ParentOrigin::CENTER, Vector2::ONE * MAGNIFIER_INDENT, Vector2::ONE * MAGNIFIER_INDENT) );
  235 + Constraint constraint = Constraint::New<Vector3>( mMagnifier, Actor::Property::POSITION, ConfinementConstraint(Vector3( 0.5f, 0.5f, 0.0f ), Vector2::ONE * MAGNIFIER_INDENT, Vector2::ONE * MAGNIFIER_INDENT) );
238 236 constraint.AddSource( LocalSource(Actor::Property::SIZE) );
239 237 constraint.AddSource( LocalSource(Actor::Property::PARENT_ORIGIN) );
240 238 constraint.AddSource( LocalSource(Actor::Property::ANCHOR_POINT) );
... ... @@ -244,7 +242,6 @@ public:
244 242  
245 243 // Create bouncing magnifier automatically bounces around screen.
246 244 mBouncingMagnifier = Toolkit::Magnifier::New();
247   - mBouncingMagnifier.SetRelayoutEnabled( false );
248 245 mBouncingMagnifier.SetSourceActor( mView.GetBackgroundLayer() );
249 246 mBouncingMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
250 247 mBouncingMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR );
... ...
examples/page-turn-view/page-turn-view-example.cpp
... ... @@ -91,8 +91,6 @@ class PortraitPageFactory : public PageFactory
91 91 page = ImageActor::New( ResourceImage::New( PAGE_IMAGES_PORTRAIT[ (pageId-1) % NUMBER_OF_PORTRAIT_IMAGE ] ) );
92 92 }
93 93  
94   - page.SetRelayoutEnabled( false );
95   -
96 94 return page;
97 95 }
98 96 };
... ... @@ -129,9 +127,6 @@ class LandscapePageFactory : public PageFactory
129 127 }
130 128 pageFront.Add(pageBack);
131 129  
132   - pageFront.SetRelayoutEnabled( false );
133   - pageBack.SetRelayoutEnabled( false );
134   -
135 130 return pageFront;
136 131 }
137 132 };
... ... @@ -237,7 +232,6 @@ void PageTurnController::OnInit( Application&amp; app )
237 232  
238 233 // Create default View.
239 234 mView = View::New();
240   - mView.SetRelayoutEnabled( false );
241 235 stage.Add( mView );
242 236  
243 237 Dali::Window winHandle = app.GetWindow();
... ... @@ -251,7 +245,6 @@ void PageTurnController::OnInit( Application&amp; app )
251 245 mView.OrientationAnimationStartedSignal().Connect( this, &PageTurnController::OnOrientationAnimationStarted );
252 246  
253 247 mPageTurnPortraitView = PageTurnPortraitView::New( mPortraitPageFactory, stageSize );
254   - mPageTurnPortraitView.SetRelayoutEnabled( false );
255 248 mPageTurnPortraitView.SetSpineShadowParameter( Vector2(70.f, 30.f) );
256 249 mPageTurnPortraitView.PageTurnStartedSignal().Connect( this, &PageTurnController::OnPageStartedTurn );
257 250 mPageTurnPortraitView.PageTurnFinishedSignal().Connect( this, &PageTurnController::OnPageFinishedTurn );
... ... @@ -260,7 +253,6 @@ void PageTurnController::OnInit( Application&amp; app )
260 253 mPageTurnPortraitView.SetPositionInheritanceMode( USE_PARENT_POSITION );
261 254  
262 255 mPageTurnLandscapeView = PageTurnLandscapeView::New( mLandscapePageFactory, Vector2(stageSize.y*0.5f, stageSize.x) );
263   - mPageTurnLandscapeView.SetRelayoutEnabled( false );
264 256 mPageTurnLandscapeView.PageTurnStartedSignal().Connect( this, &PageTurnController::OnPageStartedTurn );
265 257 mPageTurnLandscapeView.PageTurnFinishedSignal().Connect( this, &PageTurnController::OnPageFinishedTurn );
266 258 mPageTurnLandscapeView.PagePanStartedSignal().Connect( this, &PageTurnController::OnPageStartedPan );
... ...
examples/path-animation/path-animation.cpp
... ... @@ -70,7 +70,6 @@ public:
70 70 text.SetColor( Vector4(0.0f,0.0f,0.0f,1.0f));
71 71  
72 72 Slider slider = Slider::New();
73   - slider.SetRelayoutEnabled( false );
74 73 slider.SetAnchorPoint( AnchorPoint::CENTER_LEFT);
75 74 slider.SetParentOrigin( ParentOrigin::CENTER_RIGHT);
76 75 slider.SetProperty(Slider::Property::LOWER_BOUND, -1.0f );
... ... @@ -102,8 +101,8 @@ public:
102 101  
103 102 //TextInput
104 103 Dali::Layer controlsLayer = Dali::Layer::New();
105   - controlsLayer.SetRelayoutEnabled( false );
106   - controlsLayer.SetSize( stage.GetSize().x, stage.GetSize().y*0.3f, 0.0 );
  104 + controlsLayer.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
  105 + controlsLayer.SetSizeModeFactor( Vector3( 1.0f, 0.3f, 1.0f ) );
107 106 controlsLayer.SetPosition( 0.0f, stage.GetSize().y*0.8f, 0.0f );
108 107 controlsLayer.SetAnchorPoint( AnchorPoint::TOP_LEFT);
109 108 controlsLayer.SetParentOrigin( ParentOrigin::TOP_LEFT);
... ... @@ -202,7 +201,6 @@ public:
202 201 if( !mControlPoint[index] )
203 202 {
204 203 mControlPoint[index] = Toolkit::CreateSolidColorActor(Vector4(1.0f,1.0f,1.0f,1.0f));
205   - mControlPoint[index].SetRelayoutEnabled( false );
206 204 mControlPoint[index].SetParentOrigin( ParentOrigin::TOP_LEFT);
207 205 mControlPoint[index].SetAnchorPoint( AnchorPoint::CENTER );
208 206 mControlPoint[index].SetSize( 20.0f, 20.0f );
... ... @@ -224,7 +222,6 @@ public:
224 222 if( !mControlPoint[index])
225 223 {
226 224 mControlPoint[index] = Toolkit::CreateSolidColorActor(Vector4(1.0f,1.0f,1.0f,1.0f));
227   - mControlPoint[index].SetRelayoutEnabled( false );
228 225 mControlPoint[index].SetParentOrigin( ParentOrigin::TOP_LEFT);
229 226 mControlPoint[index].SetAnchorPoint( AnchorPoint::CENTER );
230 227 mControlPoint[index].SetSize( 20.0f, 20.0f );
... ... @@ -472,7 +469,6 @@ public:
472 469 //Actor
473 470 Image img = ResourceImage::New(ACTOR_IMAGE);
474 471 mActor = ImageActor::New( img );
475   - mActor.SetRelayoutEnabled( false );
476 472 mActor.SetAnchorPoint( AnchorPoint::CENTER );
477 473 mActor.SetSize( 100, 50, 1 );
478 474 stage.Add( mActor );
... ...
examples/radial-menu/radial-sweep-view-impl.cpp
... ... @@ -131,7 +131,7 @@ RadialSweepView RadialSweepViewImpl::New( float duration, float diameter, Degree
131 131 }
132 132  
133 133 RadialSweepViewImpl::RadialSweepViewImpl( float duration, float diameter, Degree initialAngle, Degree finalAngle, Degree initialSector, Degree finalSector )
134   -: Control( CONTROL_BEHAVIOUR_NONE ),
  134 +: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ),
135 135 mDuration(duration),
136 136 mDiameter(diameter),
137 137 mInitialAngle(initialAngle),
... ...
examples/scroll-view/scroll-view-example.cpp
... ... @@ -228,7 +228,6 @@ private:
228 228 Vector2 stageSize = stage.GetSize();
229 229  
230 230 mScrollView = ScrollView::New();
231   - mScrollView.SetRelayoutEnabled( false );
232 231 mScrollView.SetAnchorPoint(AnchorPoint::CENTER);
233 232 mScrollView.SetParentOrigin(ParentOrigin::CENTER);
234 233 mContentLayer.Add( mScrollView );
... ... @@ -301,7 +300,6 @@ private:
301 300 Actor CreatePage()
302 301 {
303 302 Actor page = Actor::New();
304   - page.SetRelayoutEnabled( true );
305 303 page.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
306 304 page.SetParentOrigin( ParentOrigin::CENTER );
307 305 page.SetAnchorPoint( AnchorPoint::CENTER );
... ... @@ -454,7 +452,6 @@ private:
454 452 void ApplyEffectToPage(Actor page)
455 453 {
456 454 page.RemoveConstraints();
457   - page.SetRelayoutEnabled( true );
458 455 page.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
459 456  
460 457 switch( mEffectMode )
... ... @@ -567,7 +564,6 @@ private:
567 564 Image img = ResourceImage::New(filename, ImageDimensions( width, height ), Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::BOX_THEN_LINEAR );
568 565  
569 566 ImageActor actor = ImageActor::New(img);
570   - actor.SetRelayoutEnabled( false );
571 567 actor.SetName( filename );
572 568 actor.SetParentOrigin(ParentOrigin::CENTER);
573 569 actor.SetAnchorPoint(AnchorPoint::CENTER);
... ...
examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp
... ... @@ -192,7 +192,6 @@ public:
192 192 mShadowView.SetName("Container");
193 193 mShadowView.SetParentOrigin(ParentOrigin::CENTER);
194 194 mShadowView.SetAnchorPoint(AnchorPoint::CENTER);
195   - mShadowView.SetRelayoutEnabled( true );
196 195 mShadowView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
197 196 mShadowView.SetPointLightFieldOfView( Math::PI / 2.0f);
198 197 mContents.Add(mShadowView);
... ...
resources/scripts/timing.json
... ... @@ -113,12 +113,12 @@
113 113 ]
114 114 },
115 115 {
116   - "type": "TextView",
117   - "text": "<font size='20' color='#fea011'><b>Touch</b></font>",
118   - "markup-enabled": true,
  116 + "type": "TextLabel",
  117 + "text": "Touch",
119 118 "name": "Instruction",
120 119 "parent-origin": "BOTTOM_CENTER",
121 120 "anchor-point": "BOTTOM_CENTER",
  121 + "text-color": [1, 0, 0, 1],
122 122 "position": [
123 123 0,
124 124 0,
... ...
shared/view.h
... ... @@ -76,8 +76,8 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar,
76 76 toolBarLayer.SetName( "TOOLBAR_LAYER" );
77 77 toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER );
78 78 toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER );
79   - toolBarLayer.SetSize( 0.0f, style.mToolBarHeight );
80 79 toolBarLayer.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::WIDTH );
  80 + toolBarLayer.SetSize( 0.0f, style.mToolBarHeight );
81 81  
82 82 // Raise tool bar layer to the top.
83 83 toolBarLayer.RaiseToTop();
... ...