private void SetupRectsFromSplitter()
{
if (base.children.Length != 0)
{
int num = 0;
int num2 = 0;
foreach (int num3 in this.splitState.realSizes)
{
num2 += num3;
}
float num5 = 1f;
if (num2 > (!this.vertical ? base.position.width : base.position.height))
{
num5 = (!this.vertical ? base.position.width : base.position.height) / ((float) num2);
}
SavedGUIState state = SavedGUIState.Create();
for (int i = 0; i < base.children.Length; i++)
{
int num7 = (int) Mathf.Round(this.splitState.realSizes[i] * num5);
if (this.vertical)
{
base.children[i].position = new Rect(0f, (float) num, base.position.width, (float) num7);
}
else
{
base.children[i].position = new Rect((float) num, 0f, (float) num7, base.position.height);
}
num += num7;
}
state.ApplyAndForget();
}
}