From e8abec802c418774eee18bdfdfea1e50ce1d8302 Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Mon, 18 Sep 2017 18:40:51 +0100 Subject: [PATCH] Add InheritOpacity API to View as a simplified way of using Dali COLOR_MODE Change-Id: If1676ea7682b0d8f3ad327ab795634c5a6c23266 --- Tizen.NUI/src/public/BaseComponents/View.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Tizen.NUI/src/public/BaseComponents/View.cs b/Tizen.NUI/src/public/BaseComponents/View.cs index 6ae6886..b269e05 100755 --- a/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/Tizen.NUI/src/public/BaseComponents/View.cs @@ -3389,6 +3389,22 @@ namespace Tizen.NUI.BaseComponents } /// + /// Gets/Sets the Opacity inheritance state. If true (default) This view will blend its opacity with the parents. + /// If false, this view will use its own opacity value directly. + /// + public bool InheritOpacity + { + get + { + return GetColorMode() != ColorMode.UseOwnColor; + } + set + { + SetColorMode(value ? ColorMode.UseOwnMultiplyParentAlpha : ColorMode.UseOwnColor); + } + } + + /// /// Gets/Sets the status of how the view and its children should be drawn.
/// Not all views are renderable, but DrawMode can be inherited from any view.
/// If an object is in a 3D layer, it will be depth-tested against other objects in the world i.e. it may be obscured if other objects are in front.
-- 2.7.4