[NUI] Fixed TCT failed issues (#1176)
authorzhouleonlei <56956725+zhouleonlei@users.noreply.github.com>
Wed, 11 Dec 2019 00:23:30 +0000 (08:23 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 11 Dec 2019 00:23:30 +0000 (09:23 +0900)
src/Tizen.NUI.Components/Controls/Button.cs
src/Tizen.NUI.Components/Controls/Popup.cs
src/Tizen.NUI.Components/Controls/Scrollbar.cs
src/Tizen.NUI.Components/Controls/Slider.cs
src/Tizen.NUI.Components/Controls/Switch.cs
src/Tizen.NUI.Components/Controls/Tab.cs
src/Tizen.NUI/src/public/Extents.cs

index ce29a8a..74a4e98 100755 (executable)
@@ -342,6 +342,8 @@ namespace Tizen.NUI.Components
                 }
             }
         }
+
+        private StringSelector textSelector = new StringSelector();
         /// <summary>
         /// Text string selector in Button.
         /// </summary>
@@ -350,16 +352,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style?.Text?.Text;
+                return textSelector;
             }
             set
             {
-                if (null != value && null != Style.Text)
-                {
-                    Style.Text.Text = value.Clone() as StringSelector;
-                }
+                textSelector.Clone(value);
             }
         }
+
+        private StringSelector translatableTextSelector = new StringSelector();
         /// <summary>
         /// Translateable text string selector in Button.
         /// </summary>
@@ -368,17 +369,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style?.Text?.TranslatableText;
+                return translatableTextSelector;
             }
             set
             {
-                if (null != value && null != Style?.Text)
-                {
-                    Style.Text.TranslatableText = value.Clone() as StringSelector;
-                }
+                translatableTextSelector.Clone(value);
             }
         }
 
+        private ColorSelector textColorSelector = new ColorSelector();
         /// <summary>
         /// Text color selector in Button.
         /// </summary>
@@ -387,17 +386,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (ColorSelector)Style?.Text?.TextColor;
+                return textColorSelector;
             }
             set
             {
-                if(null != value && null != Style.Text)
-                {
-                    Style.Text.TextColor = value.Clone() as ColorSelector;
-                }
+                textColorSelector.Clone(value);
             }
         }
 
+        private FloatSelector pointSizeSelector = new FloatSelector();
         /// <summary>
         /// Text font size selector in Button.
         /// </summary>
@@ -406,17 +403,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (FloatSelector)Style?.Text?.PointSize;
+                return pointSizeSelector;
             }
             set
             {
-                if (null != value && null != Style?.Text)
-                {
-                    Style.Text.PointSize = value.Clone() as FloatSelector;
-                }
+                pointSizeSelector.Clone(value);
             }
         }
 
+        private StringSelector iconURLSelector = new StringSelector();
         /// <summary>
         /// Icon image's resource url selector in Button.
         /// </summary>
@@ -425,14 +420,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style?.Icon?.ResourceUrl;
+                return iconURLSelector;
             }
             set
             {
-                if (null != value && null != Style?.Icon)
-                {
-                    Style.Icon.ResourceUrl = value.Clone() as StringSelector;
-                }
+                iconURLSelector.Clone(value);
             }
         }
 
index c7fa6d5..06a3d04 100755 (executable)
@@ -83,7 +83,7 @@ namespace Tizen.NUI.Components
         defaultValueCreator: (bindable) =>
         {
             var instance = (Popup)bindable;
-            return instance.Style.Buttons?.Size?.Height ?? 0;
+            return (int)(instance.Style?.Buttons?.Size?.Height ?? 0);
         });
 
         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
@@ -123,7 +123,7 @@ namespace Tizen.NUI.Components
         defaultValueCreator: (bindable) =>
         {
             var instance = (Popup)bindable;
-            return instance.Style.Buttons?.Text?.FontFamily;
+            return instance.Style?.Buttons?.Text?.FontFamily.All;
         });
 
         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
index fe2be17..5fbcf53 100755 (executable)
@@ -110,7 +110,7 @@ namespace Tizen.NUI.Components
                 instance.Style.Duration = (uint)newValue;
                 if (instance.scrollAniPlayer != null)
                 {
-                    instance.scrollAniPlayer.Duration = (int)newValue;
+                    instance.scrollAniPlayer.Duration = (int)instance.Style.Duration;
                 }
             }
         },
index b35b44d..159d6ea 100755 (executable)
@@ -418,6 +418,7 @@ namespace Tizen.NUI.Components
             }
         }
 
+        private StringSelector thumbImageURLSelector = new StringSelector();
         /// <summary>
         /// Gets or sets the resource url selector of the thumb image object.
         /// </summary>
@@ -426,14 +427,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style?.Thumb?.ResourceUrl;
+                return thumbImageURLSelector;
             }
             set
             {
-                if (null != value && null != Style?.Thumb)
-                {
-                    Style.Thumb.ResourceUrl = value.Clone() as StringSelector;
-                }
+                thumbImageURLSelector.Clone(value);
             }
         }
 
index e1b1cc6..8f6351d 100755 (executable)
@@ -96,6 +96,7 @@ namespace Tizen.NUI.Components
             }
         }
 
+        private StringSelector switchBackgroundImageURLSelector = new StringSelector();
         /// <summary>
         /// Background image's resource url selector in Switch.
         /// </summary>
@@ -104,14 +105,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style?.Track?.ResourceUrl;
+                return switchBackgroundImageURLSelector;
             }
             set
             {
-                if (null != value && null != Style?.Track)
-                {
-                    Style.Track.ResourceUrl = value.Clone() as StringSelector;
-                }
+                switchBackgroundImageURLSelector.Clone(value);
             }
         }
 
@@ -134,6 +132,7 @@ namespace Tizen.NUI.Components
             }
         }
 
+        private StringSelector switchHandlerImageURLSelector = new StringSelector();
         /// <summary>
         /// Handler image's resource url selector in Switch.
         /// </summary>
@@ -142,14 +141,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (StringSelector)Style?.Thumb?.ResourceUrl;
+                return switchHandlerImageURLSelector;
             }
             set
             {
-                if (null != value && null != Style?.Thumb)
-                {
-                    Style.Thumb.ResourceUrl = value.Clone() as StringSelector;
-                }
+                switchHandlerImageURLSelector.Clone(value);
             }
         }
 
index b6e206c..e8873d5 100755 (executable)
@@ -289,6 +289,7 @@ namespace Tizen.NUI.Components
             }
         }
 
+        private ColorSelector textColorSelector = new ColorSelector();
         /// <summary>
         /// Text color selector in Tab.
         /// </summary>
@@ -297,14 +298,11 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return (ColorSelector)Style?.Text?.TextColor;
+                return textColorSelector;
             }
             set
             {
-                if (null != value && null != Style?.Text)
-                {
-                    Style.Text.TextColor = value.Clone() as ColorSelector;
-                }
+                textColorSelector.Clone(value);
             }
         }
 
index d2d6d72..9985833 100755 (executable)
@@ -91,7 +91,7 @@ namespace Tizen.NUI
             Interop.Extents.Extents_start_set(swigCPtr, that.Start);
             Interop.Extents.Extents_end_set(swigCPtr, that.End);
             Interop.Extents.Extents_top_set(swigCPtr, that.Top);
-            Interop.Extents.Extents_bottom_set(swigCPtr, that.End);
+            Interop.Extents.Extents_bottom_set(swigCPtr, that.Bottom);
         }
 
         /// <summary>