public float ResizeHandle(Rect windowPosition, float minSize, float minRemainingSize, float resizerHeight, Rect dragRect)
{
if (Mathf.Abs(this.m_CachedPref) < minSize)
{
this.m_CachedPref = minSize * Mathf.Sign(this.m_CachedPref);
}
float num = windowPosition.height - minRemainingSize;
bool flag = GUIUtility.hotControl == this.id;
float num2 = (!flag) ? Mathf.Max(0f, this.m_CachedPref) : PreviewResizer.s_DraggedPreviewSize;
bool flag2 = this.m_CachedPref > 0f;
float num3 = Mathf.Abs(this.m_CachedPref);
Rect position = new Rect(0f, windowPosition.height - num2 - resizerHeight, windowPosition.width, resizerHeight);
if (dragRect.width != 0f)
{
position.x = dragRect.x;
position.width = dragRect.width;
}
bool flag3 = flag2;
num2 = -PreviewResizer.PixelPreciseCollapsibleSlider(this.id, position, -num2, -num, 0f, ref flag2);
num2 = Mathf.Min(num2, num);
flag = (GUIUtility.hotControl == this.id);
if (flag)
{
PreviewResizer.s_DraggedPreviewSize = num2;
}
if (num2 < minSize)
{
num2 = ((num2 >= minSize * 0.5f) ? minSize : 0f);
}
if (flag2 != flag3)
{
num2 = ((!flag2) ? 0f : num3);
}
flag2 = (num2 >= minSize / 2f);
if (GUIUtility.hotControl == 0)
{
if (num2 > 0f)
{
num3 = num2;
}
float num4 = num3 * (float)((!flag2) ? -1 : 1);
if (num4 != this.m_CachedPref)
{
this.m_CachedPref = num4;
EditorPrefs.SetFloat(this.m_PrefName, this.m_CachedPref);
}
}
PreviewResizer.s_CachedPreviewSizeWhileDragging = num2;
return(num2);
}