[NUI] Correct the meaning of ExcludeLayouting. (#2257)
authorbshsqa <32317749+bshsqa@users.noreply.github.com>
Thu, 19 Nov 2020 05:47:15 +0000 (14:47 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 19 Nov 2020 09:36:46 +0000 (18:36 +0900)
Signed-off-by: seungho <sbsh.baek@samsung.com>
src/Tizen.NUI/src/internal/Layouting/GridLocations.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/Layouting/AbsoluteLayout.cs
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs
src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs
src/Tizen.NUI/src/public/Layouting/LinearLayout.cs

index 4cf885f..0d92415 100755 (executable)
@@ -152,7 +152,7 @@ namespace Tizen.NUI
                 LayoutItem item = LayoutChildren[i];
                 View view = item?.Owner;
                 if (view == null) continue;
-                if (item.Owner.ExcludeLayouting)
+                if (!item.Owner.ExcludeLayouting)
                 {
                     gridChildCount++;
                 }
@@ -177,7 +177,7 @@ namespace Tizen.NUI
                 View view = item?.Owner;
                 if (view == null) continue;
 
-                if (!view.ExcludeLayouting)
+                if (view.ExcludeLayouting)
                 {
                     MeasureChildWithoutPadding(item, widthMeasureSpec, heightMeasureSpec);
                     gridChildIndex--;
index c8881d6..21b8008 100755 (executable)
@@ -62,7 +62,7 @@ namespace Tizen.NUI.BaseComponents
         private bool controlStatePropagation = false;
         private ViewStyle viewStyle;
         private bool themeChangeSensitive = false;
-        private bool excludeLayouting = true;
+        private bool excludeLayouting = false;
 
         internal Size2D sizeSetExplicitly = new Size2D(); // Store size set by API, will be used in place of NaturalSize if not set.
         internal BackgroundExtraData backgroundExtraData;
@@ -217,9 +217,9 @@ namespace Tizen.NUI.BaseComponents
             set
             {
                 excludeLayouting = value;
-                if (Layout != null && Layout.SetPositionByLayout != value)
+                if (Layout != null && Layout.SetPositionByLayout == value)
                 {
-                    Layout.SetPositionByLayout = value;
+                    Layout.SetPositionByLayout = !value;
                     Layout.RequestLayout();
                 }
             }
@@ -2207,7 +2207,7 @@ namespace Tizen.NUI.BaseComponents
                 // Remove existing layout from it's parent layout group.
                 _layout?.Unparent();
 
-                value.SetPositionByLayout = excludeLayouting;
+                value.SetPositionByLayout = !excludeLayouting;
 
                 // Set layout to this view
                 SetLayout(value);
index 44aa5f7..ecb04eb 100755 (executable)
@@ -54,7 +54,7 @@ namespace Tizen.NUI
                     // Get size of child with no padding, no margin. we won't support margin, padding for AbsolutLayout.
                     MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
 
-                    if (!childLayout.Owner.ExcludeLayouting)
+                    if (childLayout.Owner.ExcludeLayouting)
                     {
                         continue;
                     }
index 56ed9b5..2a22439 100755 (executable)
@@ -672,7 +672,7 @@ namespace Tizen.NUI
                 if (childHandleRef.Handle == IntPtr.Zero || Child == null)
                     continue;
 
-                if (!layoutItem.Owner.ExcludeLayouting)
+                if (layoutItem.Owner.ExcludeLayouting)
                 {
                     SetFlexPositionType(Child, PositionType.Absolute);
                     Interop.FlexLayout.FlexLayout_SetFlexPositionType(childHandleRef, (int)PositionType.Absolute);
@@ -735,7 +735,7 @@ namespace Tizen.NUI
                 LayoutItem childLayout = LayoutChildren[childIndex];
                 if (childLayout != null)
                 {
-                    if (childLayout.Owner.ExcludeLayouting)
+                    if (!childLayout.Owner.ExcludeLayouting)
                     {
                         // Get the frame for the child, start, top, end, bottom.
                         Vector4 frame = new Vector4(Interop.FlexLayout.FlexLayout_GetNodeFrame(swigCPtr, childIndex), true);
index 0e40227..4172c3a 100755 (executable)
@@ -431,7 +431,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Layout independent children those Owners have false ExcludeLayouting. <br />
+        /// Layout independent children those Owners have true ExcludeLayouting. <br />
         /// These children are required not to be affected by this layout. <br />
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -443,7 +443,7 @@ namespace Tizen.NUI
                 LayoutItem childLayout = LayoutChildren[childIndex];
                 if (childLayout != null)
                 {
-                    if (!childLayout.Owner.ExcludeLayouting)
+                    if (childLayout.Owner.ExcludeLayouting)
                     {
                         LayoutLength childWidth = childLayout.MeasuredWidth.Size;
                         LayoutLength childHeight = childLayout.MeasuredHeight.Size;
index 1b7a92e..e439b5b 100755 (executable)
@@ -87,9 +87,9 @@ namespace Tizen.NUI
             set
             {
                 setPositionByLayout = value;
-                if (Owner != null && Owner.ExcludeLayouting != value)
+                if (Owner != null && Owner.ExcludeLayouting == value)
                 {
-                    Owner.ExcludeLayouting = value;
+                    Owner.ExcludeLayouting = !value;
                 }
             }
         }
@@ -269,7 +269,7 @@ namespace Tizen.NUI
             else
             {
                 // If height or width specification is not explicitly defined,
-                // the size of the owner view must be reset even the ExcludeLayouting is false.
+                // the size of the owner view must be reset even the ExcludeLayouting is true.
                 if (Owner.HeightSpecification < 0 || Owner.WidthSpecification < 0)
                 {
                     Owner.SetSize(right.AsRoundedValue() - left.AsRoundedValue(), bottom.AsRoundedValue() - top.AsRoundedValue());
index 10eee9f..ea3ee27 100755 (executable)
@@ -290,7 +290,7 @@ namespace Tizen.NUI
             for (int i = 0; i < LayoutChildren.Count; i++)
             {
                 LayoutItem childLayout = LayoutChildren[i];
-                if (!childLayout.Owner.ExcludeLayouting)
+                if (childLayout.Owner.ExcludeLayouting)
                 {
                     MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
                     continue;
@@ -407,7 +407,7 @@ namespace Tizen.NUI
                 for (int i = 0; i < numberOfChildren; ++i)
                 {
                     LayoutItem childLayout = LayoutChildren[i];
-                    if (!childLayout.Owner.ExcludeLayouting)
+                    if (childLayout.Owner.ExcludeLayouting)
                     {
                         continue;
                     }
@@ -502,7 +502,7 @@ namespace Tizen.NUI
             for (int i = 0; i < LayoutChildren.Count; i++)
             {
                 LayoutItem childLayout = LayoutChildren[i];
-                if (!childLayout.Owner.ExcludeLayouting)
+                if (childLayout.Owner.ExcludeLayouting)
                 {
                     MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
                     continue;
@@ -618,7 +618,7 @@ namespace Tizen.NUI
                 for (int i = 0; i < numberOfChildren; ++i)
                 {
                     LayoutItem childLayout = LayoutChildren[i];
-                    if (!childLayout.Owner.ExcludeLayouting)
+                    if (childLayout.Owner.ExcludeLayouting)
                     {
                         continue;
                     }
@@ -747,7 +747,7 @@ namespace Tizen.NUI
                 LayoutItem childLayout = LayoutChildren[childIndex];
                 if (childLayout != null)
                 {
-                    if (childLayout.Owner.ExcludeLayouting)
+                    if (!childLayout.Owner.ExcludeLayouting)
                     {
                         LayoutLength childWidth = childLayout.MeasuredWidth.Size;
                         LayoutLength childHeight = childLayout.MeasuredHeight.Size;
@@ -811,7 +811,7 @@ namespace Tizen.NUI
                 LayoutItem childLayout = LayoutChildren[i];
                 if (childLayout != null)
                 {
-                    if (childLayout.Owner.ExcludeLayouting)
+                    if (!childLayout.Owner.ExcludeLayouting)
                     {
                         LayoutLength childWidth = childLayout.MeasuredWidth.Size;
                         LayoutLength childHeight = childLayout.MeasuredHeight.Size;
@@ -853,7 +853,7 @@ namespace Tizen.NUI
             MeasureSpecification uniformMeasureSpec = new MeasureSpecification(MeasuredHeight.Size, MeasureSpecification.ModeType.Exactly);
             foreach (LayoutItem childLayout in LayoutChildren)
             {
-                if (!childLayout.Owner.ExcludeLayouting)
+                if (childLayout.Owner.ExcludeLayouting)
                 {
                     continue;
                 }
@@ -880,7 +880,7 @@ namespace Tizen.NUI
             MeasureSpecification uniformMeasureSpec = new MeasureSpecification(MeasuredWidth.Size, MeasureSpecification.ModeType.Exactly);
             foreach (LayoutItem childLayout in LayoutChildren)
             {
-                if (!childLayout.Owner.ExcludeLayouting)
+                if (childLayout.Owner.ExcludeLayouting)
                 {
                     continue;
                 }