private void DrawContent() { DrawInFixedRectIfNeeded(() => { float contentHeight = EditorDrawHelper.DrawVertically(_selectionTree.Draw, _preventExpandingHeight, DropdownStyle.BackgroundColor); if (_contentHeight == 0f || Event.current.type == EventType.Repaint) { _contentHeight = contentHeight; } EditorDrawHelper.DrawBorders(position.width, position.height, DropdownStyle.BorderColor); }); }
private void DrawContent() { using (new FixedRect(_preventExpandingHeight, position.width)) { using (new EditorDrawHelper.VerticalBlock(_preventExpandingHeight, DropdownStyle.BackgroundColor, out float contentHeight)) { _selectionTree.Draw(); if (Event.current.type == EventType.Repaint) { _contentHeight = contentHeight; } } EditorDrawHelper.DrawBorders(position.width, position.height, DropdownStyle.BorderColor); } }