Skip to content

Commit 7f8d00f

Browse files
authored
FIX: Update icon scaling in Input Actions window (#2054)
* Round pixelsPerPoint up rather than down when calculating icon scale * Update CHANGELOG.md
1 parent 0a13378 commit 7f8d00f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ however, it has to be formatted properly to pass verification tests.
2323
- Fixed pasting into an empty map list raising an exception. [ISXB-1150](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1150)
2424
- Fixed pasting bindings into empty Input Action asset. [ISXB-1180](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1180)
2525
- Fixed missing '&' symbol in Control Scheme dropdown on Windows platform. [ISXB-1109](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1109)
26+
- Fixed icon scaling in Input Actions window.
2627

2728
### Changed
2829
- Added back the InputManager to InputSystem project-wide asset migration code with performance improvement (ISX-2086).

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)