[NUI] Fix ImageColor alpha not applied issue
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 13 Sep 2023 03:04:35 +0000 (12:04 +0900)
committerbshsqa <32317749+bshsqa@users.noreply.github.com>
Thu, 14 Sep 2023 10:40:33 +0000 (19:40 +0900)
Visual look at same value, Visual.MixColor's alpha and Visual.Opacity,
we need to synchronize both values.

Since we don't open Visual.Opacity property for View side
let we control this value inside of View.

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/ImageView.cs
src/Tizen.NUI/src/public/BaseComponents/ImageViewBindableProperty.cs

index 7bdc3c1..dd9f625 100755 (executable)
@@ -67,6 +67,7 @@ namespace Tizen.NUI.BaseComponents
             ImageVisualProperty.WrapModeV,
             ImageVisualProperty.SynchronousLoading,
             Visual.Property.MixColor,
+            Visual.Property.Opacity,
             Visual.Property.PremultipliedAlpha,
             ImageVisualProperty.OrientationCorrection,
             ImageVisualProperty.FastTrackUploading,
index 5ea4767..f8b8613 100755 (executable)
@@ -589,6 +589,7 @@ namespace Tizen.NUI.BaseComponents
             var imageView = (ImageView)bindable;
             if (newValue != null)
             {
+                imageView.UpdateImage(Visual.Property.Opacity, new PropertyValue(((Color)newValue).A), false);
                 imageView.UpdateImage(Visual.Property.MixColor, new PropertyValue((Color)newValue));
             }
         },