[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 0df2242cf95f419e82d91a7cfb90fc596a39361c..8b27138b699f1998508913938a53dcdd94768294 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