Skip to content

Commit 0a05863

Browse files
committed
fix: Started rounding up values of the window position before its creation.
1 parent f44a920 commit 0a05863

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Editor/TypeSelectionWindows/Util/CenteredTypeDropdownDrawer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace GenericScriptableObjects.Editor.TypeSelectionWindows.Util
22
{
33
using System;
4+
using SolidUtilities.Extensions;
45
using TypeReferences;
56
using TypeReferences.Editor.Drawers;
67
using TypeReferences.Editor.TypeDropdown;
@@ -30,6 +31,7 @@ public CenteredTypeDropdownDrawer(Type selectedType, TypeOptionsAttribute attrib
3031

3132
Vector2 dropdownPosition = EditorGUIUtility.GetMainWindowPosition().center;
3233
dropdownPosition.x -= DropdownWindow.CalculateOptimalWidth(selectionTree.SelectionPaths) / 2f;
34+
dropdownPosition = dropdownPosition.RoundUp();
3335

3436
return DropdownWindow.Create(selectionTree, _attribute.DropdownHeight, dropdownPosition);
3537
}

0 commit comments

Comments
 (0)