Skip to content

Commit 0024956

Browse files
committed
Round pixelsPerPoint up rather than down when calculating icon scale
1 parent 343e8bf commit 0024956

File tree

1 file changed

+1
-1
lines changed
  • Packages/com.unity.inputsystem/InputSystem/Editor/Internal

1 file changed

+1
-1
lines changed

Packages/com.unity.inputsystem/InputSystem/Editor/Internal/GUIHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static void DrawLineSeparator(string label = null)
4343
public static Texture2D LoadIcon(string name)
4444
{
4545
var skinPrefix = EditorGUIUtility.isProSkin ? "d_" : "";
46-
var scale = Mathf.Clamp((int)EditorGUIUtility.pixelsPerPoint, 0, 4);
46+
var scale = Mathf.Clamp(Mathf.CeilToInt(EditorGUIUtility.pixelsPerPoint), 0, 4);
4747
var scalePostFix = scale > 1 ? $"@{scale}x" : "";
4848
if (name.IndexOfAny(Path.GetInvalidFileNameChars()) > -1)
4949
name = string.Join("_", name.Split(Path.GetInvalidFileNameChars()));

0 commit comments

Comments
 (0)