private bool DrawSize()
        {
            bool changed = false;

            if (NGUIEditorTools.DrawHeader("Size"))
            {
                NGUIEditorTools.BeginContents();
                if (EditorGUILayoutUtil.PopupEnum <UITableLayout.HAlign>("Horizontal Align", ref grid.halign, GUILayout.ExpandWidth(false)))
                {
                    for (int i = 0; i < grid.haligns.Length; ++i)
                    {
                        grid.haligns[i] = grid.halign;
                    }
                    changed = true;
                }
                if (EditorGUILayoutUtil.PopupEnum <UITableLayout.VAlign>("Vertical Align", ref grid.valign, GUILayout.ExpandWidth(false)))
                {
                    for (int i = 0; i < grid.valigns.Length; ++i)
                    {
                        grid.valigns[i] = grid.valign;
                    }
                    changed = true;
                }
                changed |= EditorGUILayoutUtil.Vector2Field("Padding", ref grid.padding);
                if (grid.cellMinSize.x == 0 && grid.cellMinSize.y == 0)
                {
                    changed |= EditorGUILayoutUtil.Vector2Field("Cell Size", ref grid.cellSize);
                }
                if (grid.cellSize.x == 0 && grid.cellSize.y == 0)
                {
                    changed |= EditorGUILayoutUtil.Vector2Field("Cell Min Size", ref grid.cellMinSize);
                }
                changed |= EditorGUILayoutUtil.IntField("Total Width", ref grid.totalWidth);
                changed |= EditorGUILayoutUtil.Toggle("Resize Collider", ref grid.resizeCollider, GUILayout.ExpandWidth(false));
                if (grid.resizeCollider && grid.padding != Vector2.zero)
                {
                    EditorGUI.indentLevel += 1;
                    changed |= EditorGUILayoutUtil.Toggle("Expand Collider To Padding", ref grid.expandColliderToPadding, GUILayout.ExpandWidth(false));
                    EditorGUI.indentLevel -= 1;
                }
                NGUIEditorTools.EndContents();
            }
            return(changed);
        }