From 1b22ae6ed17a66848c848fc736f9ecab53e12f05 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Fri, 19 Sep 2014 11:02:15 +0100 Subject: [PATCH] (Control) Ensure background-color blends fully with the control color Change-Id: I361c9452b814b6aeb407ba2d99155606ab4aad0d --- base/dali-toolkit/public-api/controls/control-impl.cpp | 1 + base/dali-toolkit/public-api/controls/control.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/base/dali-toolkit/public-api/controls/control-impl.cpp b/base/dali-toolkit/public-api/controls/control-impl.cpp index e45436f..74720d0 100644 --- a/base/dali-toolkit/public-api/controls/control-impl.cpp +++ b/base/dali-toolkit/public-api/controls/control-impl.cpp @@ -206,6 +206,7 @@ void SetupBackgroundActor( Actor actor, Property::Index constrainingIndex, const { actor.SetColor( color ); actor.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION ); + actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR ); actor.SetZ( BACKGROUND_ACTOR_Z_POSITION ); Constraint constraint = Constraint::New( constrainingIndex, diff --git a/base/dali-toolkit/public-api/controls/control.h b/base/dali-toolkit/public-api/controls/control.h index 951c2b6..b72f20f 100644 --- a/base/dali-toolkit/public-api/controls/control.h +++ b/base/dali-toolkit/public-api/controls/control.h @@ -324,6 +324,8 @@ public: * @brief Sets the background color of the control. * * @param[in] color The required background color of the control + * + * @note The background color fully blends with the actor color. */ void SetBackgroundColor( const Vector4& color ); -- 2.7.4