diff --git a/demo/dali-table-view.cpp b/demo/dali-table-view.cpp index 847dddd..c1b7f6b 100644 --- a/demo/dali-table-view.cpp +++ b/demo/dali-table-view.cpp @@ -123,21 +123,21 @@ const float IMAGE_BORDER_BOTTOM = IMAGE_BORDER_LEFT; struct AnimateBubbleConstraint { public: - AnimateBubbleConstraint( const Vector3& initialPos, float scale, float size ) + AnimateBubbleConstraint( const Vector3& initialPos, float scale ) : mInitialX( initialPos.x ), - mScale( scale ), - mShapeSize( size ) + mScale( scale ) { } void operator()( Vector3& position, const PropertyInputContainer& inputs ) { const Vector3& parentSize = inputs[1]->GetVector3(); + const Vector3& childSize = inputs[2]->GetVector3(); // Wrap bubbles verically. - if( position.y + mShapeSize * 0.5f < -parentSize.y * 0.5f ) + if( position.y + childSize.y * 0.5f < -parentSize.y * 0.5f ) { - position.y = parentSize.y * 0.5f + mShapeSize * 0.5f; + position.y = parentSize.y * 0.5f + childSize.y * 0.5f; } // Bubbles X position moves parallax to horizontal @@ -267,7 +267,6 @@ void DaliTableView::Initialize( Application& application ) // scrollview occupying the majority of the screen mScrollView = ScrollView::New(); - mScrollView.SetRelayoutEnabled( true ); mScrollView.SetAnchorPoint( AnchorPoint::CENTER ); mScrollView.SetParentOrigin( ParentOrigin::CENTER ); @@ -297,7 +296,6 @@ void DaliTableView::Initialize( Application& application ) // Populate background and bubbles - needs to be scrollViewLayer so scroll ends show Actor bubbleContainer = Actor::New(); - bubbleContainer.SetRelayoutEnabled( true ); bubbleContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); bubbleContainer.SetAnchorPoint( AnchorPoint::CENTER ); bubbleContainer.SetParentOrigin( ParentOrigin::CENTER ); @@ -492,7 +490,6 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit content.SetName( name ); content.SetAnchorPoint( AnchorPoint::CENTER ); content.SetParentOrigin( ParentOrigin::CENTER ); - content.SetRelayoutEnabled( true ); content.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); content.SetSizeModeFactor( sizeMultiplier ); @@ -746,19 +743,18 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor ) { Actor child = actor.GetChildAt( i ); - const Vector3 childSize = child.GetTargetSize(); - // Calculate a random position Vector3 childPos( Random::Range( -size.x * 0.5f * BACKGROUND_SPREAD_SCALE, size.x * 0.5f * BACKGROUND_SPREAD_SCALE ), - Random::Range( -size.y * 0.5f - childSize.height, size.y * 0.5f + childSize.height ), + Random::Range( -size.y, size.y ), Random::Range( BUBBLE_MIN_Z, BUBBLE_MAX_Z ) ); child.SetPosition( childPos ); // Define bubble horizontal parallax and vertical wrapping - Constraint animConstraint = Constraint::New < Vector3 > ( child, Actor::Property::POSITION, AnimateBubbleConstraint( childPos, Random::Range( -0.85f, 0.25f ), childSize.height ) ); + Constraint animConstraint = Constraint::New < Vector3 > ( child, Actor::Property::POSITION, AnimateBubbleConstraint( childPos, Random::Range( -0.85f, 0.25f ) ) ); animConstraint.AddSource( Source( mScrollView, ScrollView::Property::SCROLL_POSITION ) ); animConstraint.AddSource( Dali::ParentSource( Dali::Actor::Property::SIZE ) ); + animConstraint.AddSource( Dali::LocalSource( Dali::Actor::Property::SIZE ) ); animConstraint.Apply(); // Kickoff animation @@ -779,7 +775,6 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis Vector4 randColour( hue, hue * 0.5, 0.0f, Random::Range( 0.3f, 0.6f )); ImageActor dfActor = ImageActor::New( distanceField ); - dfActor.SetRelayoutEnabled( false ); dfActor.SetSize( Vector2( randSize, randSize ) ); dfActor.SetParentOrigin( ParentOrigin::CENTER ); @@ -885,7 +880,7 @@ void DaliTableView::PauseAnimation() { Animation anim = *animIter; - anim.Pause(); + anim.Stop(); } mBackgroundAnimsPlaying = false; @@ -1008,8 +1003,6 @@ void DaliTableView::OnLogoTapped( Dali::Actor actor, const Dali::TapGesture& tap mVersionPopup.HideTail(); mVersionPopup.OutsideTouchedSignal().Connect( this, &DaliTableView::HideVersionPopup ); mVersionPopup.HiddenSignal().Connect( this, &DaliTableView::PopupHidden ); - - mVersionPopup.MarkDirtyForRelayout(); } mVersionPopup.Show(); diff --git a/examples/blocks/blocks-example.cpp b/examples/blocks/blocks-example.cpp index db050fe..3d96204 100644 --- a/examples/blocks/blocks-example.cpp +++ b/examples/blocks/blocks-example.cpp @@ -358,8 +358,8 @@ private: mLevelContainer = Actor::New(); mLevelContainer.SetAnchorPoint( AnchorPoint::CENTER ); mLevelContainer.SetParentOrigin( ParentOrigin::CENTER ); - mLevelContainer.SetRelayoutEnabled( true ); mLevelContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); + mContentLayer.Add( mLevelContainer ); mBrickCount = 0; @@ -528,7 +528,6 @@ private: ImageActor brick = ImageActor::New(img); brick.SetParentOrigin(ParentOrigin::TOP_LEFT); brick.SetAnchorPoint(AnchorPoint::CENTER); - brick.SetRelayoutEnabled( false ); brick.SetSize( brickSize ); brick.SetPosition( Vector3( position ) ); @@ -560,7 +559,6 @@ private: ImageActor actor = ImageActor::New(img); actor.SetParentOrigin(ParentOrigin::TOP_LEFT); actor.SetAnchorPoint(AnchorPoint::CENTER); - actor.SetRelayoutEnabled( false ); return actor; } diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp index 5578d7c..f43ba1e 100644 --- a/examples/builder/examples.cpp +++ b/examples/builder/examples.cpp @@ -287,7 +287,6 @@ public: mFiles.clear(); mItemView = ItemView::New(*this); - mItemView.SetRelayoutEnabled( false ); stage.Add( mItemView ); mItemView.SetParentOrigin(ParentOrigin::CENTER); mItemView.SetAnchorPoint(AnchorPoint::CENTER); @@ -469,9 +468,6 @@ public: } builder.AddActors( layer ); - - // Force relayout on layer - layer.RelayoutRequestTree(); } diff --git a/examples/buttons/buttons-example.cpp b/examples/buttons/buttons-example.cpp index 88aa86f..f5c035a 100644 --- a/examples/buttons/buttons-example.cpp +++ b/examples/buttons/buttons-example.cpp @@ -214,8 +214,8 @@ class ButtonsController: public ConnectionTracker mBigImage3 = ResourceImage::New( BIG_IMAGE_3 ); mImage = ImageActor::New( mBigImage1 ); - mImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT ); - mImage.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH ); + mImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); + mImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); radioGroup2Background.AddChild( mImage, Toolkit::TableView::CellPosition( 0, 1, 2, 1 ) ); // The enable/disable radio group @@ -349,7 +349,6 @@ class ButtonsController: public ConnectionTracker contentTable.Add( toggleBackground ); - Toolkit::PushButton toggleButton = Toolkit::PushButton::New(); toggleButton.SetTogglableButton( true ); toggleButton.SetLabel( "Unselected" ); diff --git a/examples/cluster/cluster-example.cpp b/examples/cluster/cluster-example.cpp index d9c3610..c0f92b1 100644 --- a/examples/cluster/cluster-example.cpp +++ b/examples/cluster/cluster-example.cpp @@ -477,7 +477,6 @@ public: // create and setup the scroll view... mScrollView = ScrollView::New(); - mScrollView.SetRelayoutEnabled( false ); mScrollView.SetSize(stageSize); // attach Wobble Effect to ScrollView @@ -489,7 +488,6 @@ public: mScrollView.SetParentOrigin(ParentOrigin::CENTER); // Scale ScrollView to fit parent (mContentLayer) - mScrollView.SetRelayoutEnabled( true ); mScrollView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); // Add the scroll view to the content layer @@ -511,17 +509,20 @@ public: /** * Helper to create the cluster actors */ - Cluster CreateClusterActor(ClusterType clusterType, ClusterStyle style) + Cluster CreateClusterActor(ClusterType clusterType, ClusterStyle style, Vector3& clusterSize) { // Create the cluster actor with the given cluster style Cluster clusterActor = Cluster::New(style); clusterActor.SetParentOrigin(ParentOrigin::CENTER); clusterActor.SetAnchorPoint(AnchorPoint::CENTER); - clusterActor.SetRelayoutEnabled( false ); Vector2 stageSize = Dali::Stage::GetCurrent().GetSize(); float minStageDimension = std::min(stageSize.x, stageSize.y); - clusterActor.SetSize(minStageDimension * CLUSTER_RELATIVE_SIZE, minStageDimension * CLUSTER_RELATIVE_SIZE, 0.0f); + + clusterSize.x = minStageDimension * CLUSTER_RELATIVE_SIZE; + clusterSize.y = minStageDimension * CLUSTER_RELATIVE_SIZE; + + clusterActor.SetSize( clusterSize ); DALI_ASSERT_ALWAYS(clusterType < CLUSTER_COUNT); const char **paths = IMAGE_GROUPS[clusterType]; @@ -532,7 +533,6 @@ public: // filter mode: 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 ); ImageActor image = ImageActor::New(bg); - image.SetRelayoutEnabled( false ); clusterActor.SetBackgroundImage(image); // Add actors (pictures) as the children of the cluster @@ -622,19 +622,18 @@ public: mScrollView.Add(pageView); pageView.SetParentOrigin(ParentOrigin::CENTER); pageView.SetPosition(Vector3(stageSize.width * column, 0.0f, 0.0f)); - pageView.SetRelayoutEnabled( true ); pageView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); // Create cluster actors, add them to scroll view, and set the shear effect with the given center point. - Cluster cluster = CreateClusterActor(clusterType, style); + Vector3 clusterSize; + Cluster cluster = CreateClusterActor( clusterType, style, clusterSize ); cluster.SetParentOrigin(ParentOrigin::TOP_LEFT); cluster.SetAnchorPoint(AnchorPoint::TOP_LEFT); cluster.SetPosition( clusterPosition ); pageView.Add(cluster); - Vector3 clusterSize = cluster.GetCurrentSize(); - mClusterInfo.push_back(ClusterInfo( cluster, mClusterCount, clusterPosition, clusterSize )); + mClusterInfo.push_back( ClusterInfo( cluster, mClusterCount, clusterPosition, clusterSize ) ); mClusterCount++; } diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp index 0090720..abc16d8 100644 --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -326,7 +326,6 @@ void CubeTransitionApp::GoToNextImage() mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION); mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); - mNextImage.SetRelayoutEnabled( false ); mCurrentEffect.SetTargetImage(mNextImage); if( image.GetLoadingState() == ResourceLoadingSucceeded ) { diff --git a/examples/dissolve-effect/dissolve-effect-example.cpp b/examples/dissolve-effect/dissolve-effect-example.cpp index 1ec0293..fdada71 100644 --- a/examples/dissolve-effect/dissolve-effect-example.cpp +++ b/examples/dissolve-effect/dissolve-effect-example.cpp @@ -250,7 +250,6 @@ void DissolveEffectApp::OnInit( Application& application ) // show the first image mCurrentImage = ImageActor::New( LoadStageFillingImage( IMAGES[mIndex] ) ); - mCurrentImage.SetRelayoutEnabled( false ); mCurrentImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); @@ -281,7 +280,6 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) Image image = LoadStageFillingImage( IMAGES[ mIndex ] ); mNextImage = ImageActor::New( image ); - mNextImage.SetRelayoutEnabled( false ); mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); diff --git a/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp b/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp index e3d7a51..d0772a3 100644 --- a/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp +++ b/examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp @@ -419,7 +419,6 @@ public: // coordinates in a frame defined by a parent actor: Actor gridActor = Actor::New(); - gridActor.SetRelayoutEnabled( true ); gridActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); gridActor.SetParentOrigin( ParentOrigin::CENTER ); gridActor.SetAnchorPoint( AnchorPoint::CENTER ); diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index a750d4f..9bfbac8 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -314,7 +314,6 @@ public: // Create the item view actor mImageAtlas = CreateImageAtlas(); mItemView = ItemView::New(*this); - mItemView.SetRelayoutEnabled( false ); mItemView.SetParentOrigin(ParentOrigin::CENTER); mItemView.SetAnchorPoint(AnchorPoint::CENTER); @@ -905,7 +904,6 @@ public: // From ItemFactory // Add a checkbox child actor; invisible until edit-mode is enabled ImageActor checkbox = ImageActor::New( mWhiteImage ); - checkbox.SetRelayoutEnabled( false ); checkbox.SetName( "CheckBox" ); checkbox.SetColor( Vector4(0.0f,0.0f,0.0f,0.6f) ); checkbox.SetParentOrigin( ParentOrigin::TOP_RIGHT ); @@ -922,7 +920,6 @@ public: // From ItemFactory actor.Add( checkbox ); ImageActor tick = ImageActor::New( ResourceImage::New(SELECTED_IMAGE) ); - tick.SetRelayoutEnabled( false ); tick.SetColorMode( USE_OWN_COLOR ); tick.SetName( "Tick" ); tick.SetParentOrigin( ParentOrigin::TOP_RIGHT ); @@ -1010,7 +1007,6 @@ private: slider.Add( text ); Actor textContainer = Actor::New(); - textContainer.SetRelayoutEnabled( true ); textContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); mAlphaFunctionText = TextLabel::New( ALPHA_FUNCTIONS_TEXT[mAlphaFuncIndex] ); mAlphaFunctionText.SetAnchorPoint( ParentOrigin::CENTER ); @@ -1029,7 +1025,6 @@ private: text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y ); textContainer.Add( text ); - mMenu.MarkDirtyForRelayout(); mMenu.Show(); mMenuShown = true; } diff --git a/examples/magnifier/magnifier-example.cpp b/examples/magnifier/magnifier-example.cpp index 4c8ea21..791935d 100644 --- a/examples/magnifier/magnifier-example.cpp +++ b/examples/magnifier/magnifier-example.cpp @@ -219,14 +219,12 @@ public: // Create magnifier (controlled by human touch) Layer overlay = Layer::New(); - overlay.SetRelayoutEnabled( false ); overlay.SetSensitive(false); overlay.SetParentOrigin( ParentOrigin::CENTER ); overlay.SetSize(mStageSize); Stage::GetCurrent().Add(overlay); mMagnifier = Toolkit::Magnifier::New(); - mMagnifier.SetRelayoutEnabled( false ); mMagnifier.SetSourceActor( mView.GetBackgroundLayer() ); mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width mMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR ); @@ -234,7 +232,7 @@ public: overlay.Add( mMagnifier ); // Apply constraint to animate the position of the magnifier. - Constraint constraint = Constraint::New( mMagnifier, Actor::Property::POSITION, ConfinementConstraint(ParentOrigin::CENTER, Vector2::ONE * MAGNIFIER_INDENT, Vector2::ONE * MAGNIFIER_INDENT) ); + Constraint constraint = Constraint::New( mMagnifier, Actor::Property::POSITION, ConfinementConstraint(Vector3( 0.5f, 0.5f, 0.0f ), Vector2::ONE * MAGNIFIER_INDENT, Vector2::ONE * MAGNIFIER_INDENT) ); constraint.AddSource( LocalSource(Actor::Property::SIZE) ); constraint.AddSource( LocalSource(Actor::Property::PARENT_ORIGIN) ); constraint.AddSource( LocalSource(Actor::Property::ANCHOR_POINT) ); @@ -244,7 +242,6 @@ public: // Create bouncing magnifier automatically bounces around screen. mBouncingMagnifier = Toolkit::Magnifier::New(); - mBouncingMagnifier.SetRelayoutEnabled( false ); mBouncingMagnifier.SetSourceActor( mView.GetBackgroundLayer() ); mBouncingMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width mBouncingMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR ); diff --git a/examples/page-turn-view/page-turn-view-example.cpp b/examples/page-turn-view/page-turn-view-example.cpp index 33498cd..a57b9f4 100644 --- a/examples/page-turn-view/page-turn-view-example.cpp +++ b/examples/page-turn-view/page-turn-view-example.cpp @@ -91,8 +91,6 @@ class PortraitPageFactory : public PageFactory page = ImageActor::New( ResourceImage::New( PAGE_IMAGES_PORTRAIT[ (pageId-1) % NUMBER_OF_PORTRAIT_IMAGE ] ) ); } - page.SetRelayoutEnabled( false ); - return page; } }; @@ -129,9 +127,6 @@ class LandscapePageFactory : public PageFactory } pageFront.Add(pageBack); - pageFront.SetRelayoutEnabled( false ); - pageBack.SetRelayoutEnabled( false ); - return pageFront; } }; @@ -237,7 +232,6 @@ void PageTurnController::OnInit( Application& app ) // Create default View. mView = View::New(); - mView.SetRelayoutEnabled( false ); stage.Add( mView ); Dali::Window winHandle = app.GetWindow(); @@ -251,7 +245,6 @@ void PageTurnController::OnInit( Application& app ) mView.OrientationAnimationStartedSignal().Connect( this, &PageTurnController::OnOrientationAnimationStarted ); mPageTurnPortraitView = PageTurnPortraitView::New( mPortraitPageFactory, stageSize ); - mPageTurnPortraitView.SetRelayoutEnabled( false ); mPageTurnPortraitView.SetSpineShadowParameter( Vector2(70.f, 30.f) ); mPageTurnPortraitView.PageTurnStartedSignal().Connect( this, &PageTurnController::OnPageStartedTurn ); mPageTurnPortraitView.PageTurnFinishedSignal().Connect( this, &PageTurnController::OnPageFinishedTurn ); @@ -260,7 +253,6 @@ void PageTurnController::OnInit( Application& app ) mPageTurnPortraitView.SetPositionInheritanceMode( USE_PARENT_POSITION ); mPageTurnLandscapeView = PageTurnLandscapeView::New( mLandscapePageFactory, Vector2(stageSize.y*0.5f, stageSize.x) ); - mPageTurnLandscapeView.SetRelayoutEnabled( false ); mPageTurnLandscapeView.PageTurnStartedSignal().Connect( this, &PageTurnController::OnPageStartedTurn ); mPageTurnLandscapeView.PageTurnFinishedSignal().Connect( this, &PageTurnController::OnPageFinishedTurn ); mPageTurnLandscapeView.PagePanStartedSignal().Connect( this, &PageTurnController::OnPageStartedPan ); diff --git a/examples/path-animation/path-animation.cpp b/examples/path-animation/path-animation.cpp index af86c93..5566cc9 100644 --- a/examples/path-animation/path-animation.cpp +++ b/examples/path-animation/path-animation.cpp @@ -70,7 +70,6 @@ public: text.SetColor( Vector4(0.0f,0.0f,0.0f,1.0f)); Slider slider = Slider::New(); - slider.SetRelayoutEnabled( false ); slider.SetAnchorPoint( AnchorPoint::CENTER_LEFT); slider.SetParentOrigin( ParentOrigin::CENTER_RIGHT); slider.SetProperty(Slider::Property::LOWER_BOUND, -1.0f ); @@ -102,8 +101,8 @@ public: //TextInput Dali::Layer controlsLayer = Dali::Layer::New(); - controlsLayer.SetRelayoutEnabled( false ); - controlsLayer.SetSize( stage.GetSize().x, stage.GetSize().y*0.3f, 0.0 ); + controlsLayer.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); + controlsLayer.SetSizeModeFactor( Vector3( 1.0f, 0.3f, 1.0f ) ); controlsLayer.SetPosition( 0.0f, stage.GetSize().y*0.8f, 0.0f ); controlsLayer.SetAnchorPoint( AnchorPoint::TOP_LEFT); controlsLayer.SetParentOrigin( ParentOrigin::TOP_LEFT); @@ -202,7 +201,6 @@ public: if( !mControlPoint[index] ) { mControlPoint[index] = Toolkit::CreateSolidColorActor(Vector4(1.0f,1.0f,1.0f,1.0f)); - mControlPoint[index].SetRelayoutEnabled( false ); mControlPoint[index].SetParentOrigin( ParentOrigin::TOP_LEFT); mControlPoint[index].SetAnchorPoint( AnchorPoint::CENTER ); mControlPoint[index].SetSize( 20.0f, 20.0f ); @@ -224,7 +222,6 @@ public: if( !mControlPoint[index]) { mControlPoint[index] = Toolkit::CreateSolidColorActor(Vector4(1.0f,1.0f,1.0f,1.0f)); - mControlPoint[index].SetRelayoutEnabled( false ); mControlPoint[index].SetParentOrigin( ParentOrigin::TOP_LEFT); mControlPoint[index].SetAnchorPoint( AnchorPoint::CENTER ); mControlPoint[index].SetSize( 20.0f, 20.0f ); @@ -472,7 +469,6 @@ public: //Actor Image img = ResourceImage::New(ACTOR_IMAGE); mActor = ImageActor::New( img ); - mActor.SetRelayoutEnabled( false ); mActor.SetAnchorPoint( AnchorPoint::CENTER ); mActor.SetSize( 100, 50, 1 ); stage.Add( mActor ); diff --git a/examples/radial-menu/radial-sweep-view-impl.cpp b/examples/radial-menu/radial-sweep-view-impl.cpp index 50736a2..1062406 100644 --- a/examples/radial-menu/radial-sweep-view-impl.cpp +++ b/examples/radial-menu/radial-sweep-view-impl.cpp @@ -131,7 +131,7 @@ RadialSweepView RadialSweepViewImpl::New( float duration, float diameter, Degree } RadialSweepViewImpl::RadialSweepViewImpl( float duration, float diameter, Degree initialAngle, Degree finalAngle, Degree initialSector, Degree finalSector ) -: Control( CONTROL_BEHAVIOUR_NONE ), +: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ), mDuration(duration), mDiameter(diameter), mInitialAngle(initialAngle), diff --git a/examples/scroll-view/scroll-view-example.cpp b/examples/scroll-view/scroll-view-example.cpp index aa6f0d6..e499377 100644 --- a/examples/scroll-view/scroll-view-example.cpp +++ b/examples/scroll-view/scroll-view-example.cpp @@ -228,7 +228,6 @@ private: Vector2 stageSize = stage.GetSize(); mScrollView = ScrollView::New(); - mScrollView.SetRelayoutEnabled( false ); mScrollView.SetAnchorPoint(AnchorPoint::CENTER); mScrollView.SetParentOrigin(ParentOrigin::CENTER); mContentLayer.Add( mScrollView ); @@ -301,7 +300,6 @@ private: Actor CreatePage() { Actor page = Actor::New(); - page.SetRelayoutEnabled( true ); page.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); page.SetParentOrigin( ParentOrigin::CENTER ); page.SetAnchorPoint( AnchorPoint::CENTER ); @@ -454,7 +452,6 @@ private: void ApplyEffectToPage(Actor page) { page.RemoveConstraints(); - page.SetRelayoutEnabled( true ); page.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); switch( mEffectMode ) @@ -567,7 +564,6 @@ private: Image img = ResourceImage::New(filename, ImageDimensions( width, height ), Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::BOX_THEN_LINEAR ); ImageActor actor = ImageActor::New(img); - actor.SetRelayoutEnabled( false ); actor.SetName( filename ); actor.SetParentOrigin(ParentOrigin::CENTER); actor.SetAnchorPoint(AnchorPoint::CENTER); diff --git a/examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp b/examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp index 42f0c0d..4a3ca8a 100644 --- a/examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp +++ b/examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp @@ -192,7 +192,6 @@ public: mShadowView.SetName("Container"); mShadowView.SetParentOrigin(ParentOrigin::CENTER); mShadowView.SetAnchorPoint(AnchorPoint::CENTER); - mShadowView.SetRelayoutEnabled( true ); mShadowView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); mShadowView.SetPointLightFieldOfView( Math::PI / 2.0f); mContents.Add(mShadowView); diff --git a/resources/scripts/timing.json b/resources/scripts/timing.json index a5d8024..e3864f1 100644 --- a/resources/scripts/timing.json +++ b/resources/scripts/timing.json @@ -113,12 +113,12 @@ ] }, { - "type": "TextView", - "text": "Touch", - "markup-enabled": true, + "type": "TextLabel", + "text": "Touch", "name": "Instruction", "parent-origin": "BOTTOM_CENTER", "anchor-point": "BOTTOM_CENTER", + "text-color": [1, 0, 0, 1], "position": [ 0, 0, diff --git a/shared/view.h b/shared/view.h index 915dbd5..d1cca77 100644 --- a/shared/view.h +++ b/shared/view.h @@ -76,8 +76,8 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar& toolBar, toolBarLayer.SetName( "TOOLBAR_LAYER" ); toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); - toolBarLayer.SetSize( 0.0f, style.mToolBarHeight ); toolBarLayer.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::WIDTH ); + toolBarLayer.SetSize( 0.0f, style.mToolBarHeight ); // Raise tool bar layer to the top. toolBarLayer.RaiseToTop();