Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 952839d

Browse files
author
Andreia Gaita
authored
Merge pull request #885 from github-for-unity/fix-asset-explorer-icon-overlay-highdpi
Scaling the image by pixelsPerPoint
2 parents ced00d8 + e5280cd commit 952839d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ private static void OnProjectWindowItemGUI(string guid, Rect itemRect)
283283
{
284284
var scale = itemRect.height / 90f;
285285
var size = new Vector2(texture.width * scale, texture.height * scale);
286+
size = size / EditorGUIUtility.pixelsPerPoint;
286287
var offset = new Vector2(itemRect.width * Mathf.Min(.4f * scale, .2f), itemRect.height * Mathf.Min(.2f * scale, .2f));
287288
rect = new Rect(itemRect.center.x - size.x * .5f + offset.x, itemRect.center.y - size.y * .5f + offset.y, size.x, size.y);
288289
}

0 commit comments

Comments
 (0)