From: Victor Cebollada Date: Mon, 3 Apr 2017 16:00:02 +0000 (+0100) Subject: Fix to allow Actor::COLOR property to change text color X-Git-Tag: dali_1.2.34~5 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=f483e6aecc52fc644e0be9b41874b1b8daf493ba;hp=43477c8c669d23e12a6c1130868cf8a3a3f0e837 Fix to allow Actor::COLOR property to change text color Disclaimer - Actor::COLOR will also affect the background color (if any SetBackground API is used) Change-Id: I4e7ed501759e6c2f2a5876e95a6bc676bbf81880 Signed-off-by: Victor Cebollada --- diff --git a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp index 69416c1..6fe86a4 100644 --- a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp @@ -451,6 +451,7 @@ struct AtlasRenderer::Impl mActor.SetParentOrigin( ParentOrigin::TOP_LEFT ); mActor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); mActor.SetSize( textSize ); + mActor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR ); } for( std::vector< MeshRecord >::iterator it = meshContainer.begin(), @@ -567,17 +568,18 @@ struct AtlasRenderer::Impl renderer.SetTextures( textureSet ); renderer.SetProperty( Dali::Renderer::Property::BLEND_MODE, BlendMode::ON ); renderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, DepthIndex::CONTENT + mDepth ); + Actor actor = Actor::New(); #if defined(DEBUG_ENABLED) actor.SetName( "Text renderable actor" ); #endif actor.AddRenderer( renderer ); - // Keep all of the origins aligned actor.SetParentOrigin( ParentOrigin::TOP_LEFT ); actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); actor.SetSize( actorSize ); actor.RegisterProperty("uOffset", Vector2::ZERO ); + actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR ); return actor; }