[NUI] Fix Shadow issue when we set BoxShadow = null (#3265)
authorEunki Hong <h.pichulia@gmail.com>
Wed, 7 Jul 2021 01:24:55 +0000 (10:24 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 9 Jul 2021 10:39:50 +0000 (19:39 +0900)
When we set view.BoxShadow.Color = new Color(~~);
BoxShadow.Color have same reference with noColor.
So noColor also become changed

We make another refernce when setup Color by noColor.
Now Color doesn't have same reference with noColor.

(Same jobs doing for noOffset and noExtents)

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Co-authored-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/public/ViewProperty/Shadow.cs
src/Tizen.NUI/src/public/ViewProperty/ShadowBase.cs

index 696c832..dc7ac8d 100755 (executable)
@@ -70,7 +70,7 @@ namespace Tizen.NUI
         /// </summary>
         internal Shadow(PropertyMap propertyMap) : base(propertyMap)
         {
-            Color = noColor;
+            Color = new Color(noColor);
             PropertyValue pValue = propertyMap.Find(ColorVisualProperty.MixColor);
             pValue?.Get(Color);
             pValue?.Dispose();
index 9ec0eb3..deec0e1 100755 (executable)
@@ -57,8 +57,8 @@ namespace Tizen.NUI
         {
             Debug.Assert(propertyMap != null);
 
-            Offset = noOffset;
-            Extents = noExtents;
+            Offset = new Vector2(noOffset);
+            Extents = new Vector2(noExtents);
 
             var transformProperty = propertyMap.Find(Visual.Property.Transform);