From: Tom Robinson Date: Mon, 18 Sep 2017 17:40:51 +0000 (+0100) Subject: Add InheritOpacity API to View as a simplified way of using Dali COLOR_MODE X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8abec802c418774eee18bdfdfea1e50ce1d8302;p=platform%2Fcore%2Fcsapi%2Fnui.git Add InheritOpacity API to View as a simplified way of using Dali COLOR_MODE Change-Id: If1676ea7682b0d8f3ad327ab795634c5a6c23266 --- 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.