Cleanup: Renamed "Cell Spacing" as "Column Spacing"

--HG--
branch : develop_5.3
release
Rahul Raman 2016-12-27 21:59:20 +00:00
parent b8bd371232
commit 2e8682a491
1 changed files with 9 additions and 9 deletions

View File

@ -73,16 +73,16 @@ namespace UnityEngine.UI.Extensions
} }
[SerializeField] [SerializeField]
protected float cellSpacing = 0f; protected float columnSpacing = 0f;
/// <summary> /// <summary>
/// The horizontal spacing between each cell in the table /// The horizontal spacing between each cell in the table
/// </summary> /// </summary>
public float CellSpacing public float ColumnSpacing
{ {
get { return cellSpacing; } get { return columnSpacing; }
set set
{ {
SetProperty(ref cellSpacing, value); SetProperty(ref columnSpacing, value);
} }
} }
@ -109,7 +109,7 @@ namespace UnityEngine.UI.Extensions
float horizontalSize = padding.horizontal; float horizontalSize = padding.horizontal;
if (columnWidths.Length > 1) if (columnWidths.Length > 1)
horizontalSize += ((columnWidths.Length - 1) * cellSpacing); horizontalSize += ((columnWidths.Length - 1) * columnSpacing);
// We calculate the actual cell count for cases where the number of children is lesser than the number of columns // We calculate the actual cell count for cases where the number of children is lesser than the number of columns
int actualCellCount = Mathf.Min(rectChildren.Count, columnWidths.Length); int actualCellCount = Mathf.Min(rectChildren.Count, columnWidths.Length);
@ -222,9 +222,9 @@ namespace UnityEngine.UI.Extensions
for (int i = 0; i < columnCount; i++) for (int i = 0; i < columnCount; i++)
{ {
requiredSizeWithoutPadding.x += columnWidths[i]; requiredSizeWithoutPadding.x += columnWidths[i];
requiredSizeWithoutPadding.x += cellSpacing; requiredSizeWithoutPadding.x += columnSpacing;
} }
requiredSizeWithoutPadding.x -= cellSpacing; requiredSizeWithoutPadding.x -= columnSpacing;
startOffset.x = GetStartOffset(0, requiredSizeWithoutPadding.x); startOffset.x = GetStartOffset(0, requiredSizeWithoutPadding.x);
@ -267,9 +267,9 @@ namespace UnityEngine.UI.Extensions
SetChildAlongAxis(rectChildren[childIndex], 1, positionY, maxPreferredHeightInRows[i]); SetChildAlongAxis(rectChildren[childIndex], 1, positionY, maxPreferredHeightInRows[i]);
if (cornerX == 1) if (cornerX == 1)
positionX -= cellSpacing; positionX -= columnSpacing;
else else
positionX += columnWidths[j] + cellSpacing; positionX += columnWidths[j] + columnSpacing;
} }
if (cornerY == 1) if (cornerY == 1)