[NUI] Restore Size2D's minus value as zero when Layout is null (#1926)
authordongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 19 Aug 2020 07:45:39 +0000 (16:45 +0900)
committerGitHub <noreply@github.com>
Wed, 19 Aug 2020 07:45:39 +0000 (16:45 +0900)
src/Tizen.NUI/src/public/BaseComponents/View.cs

index 0df2242..8b27138 100755 (executable)
@@ -745,6 +745,13 @@ namespace Tizen.NUI.BaseComponents
             get
             {
                 Size2D temp = (Size2D)GetValue(Size2DProperty);
+
+                if (this.Layout == null)
+                {
+                    if (temp.Width < 0) { temp.Width = 0; }
+                    if (temp.Height < 0) { temp.Height = 0; }
+                }
+
                 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
             }
             set