[NUI] Row/Column Spacing Underflow correction (#1909)
authorneostom432 <31119276+neostom432@users.noreply.github.com>
Tue, 11 Aug 2020 07:13:48 +0000 (16:13 +0900)
committerGitHub <noreply@github.com>
Tue, 11 Aug 2020 07:13:48 +0000 (16:13 +0900)
In comment, if developer sets negative value to Row/ColumnSpacing, it
will change to 0.

But it isn't so fix this error.

src/Tizen.NUI/src/public/Layouting/GridLayout.cs

index 859486c5989a54108d8b60adfcfcd11079e364aa..ebeb4a25235026812bacf27f83cefef7740ad48d 100755 (executable)
@@ -251,8 +251,7 @@ namespace Tizen.NUI
             set
             {
                 if (columnSpacing == value) return;
-                if (columnSpacing < 0) columnSpacing = 0;
-                columnSpacing = value;
+                columnSpacing = value > 0 ? value : 0;
 
                 RequestLayout();
             }
@@ -268,8 +267,7 @@ namespace Tizen.NUI
             set
             {
                 if (rowSpacing == value) return;
-                if (rowSpacing < 0) rowSpacing = 0;
-                rowSpacing = value;
+                rowSpacing = value > 0 ? value : 0;
 
                 RequestLayout();
             }