Skip to content

Commit 0cd5f85

Browse files
committed
fix(library): inset row-action icons to match status-icon padding
The Select / Teleport / Remove buttons on the Instantiated tab were rendering their icons at the full 80x80 button area, so the icon strokes ran right up to (and sometimes past) the colored bevel edges. The row's left-side status icons (which use PE Image Simple Square) don't have this problem — that prefab insets the icon RectTransform with sizeDelta -30, leaving a 15px margin on each side. Apply the same sizeDelta -30 to the three row-action button icons after SetIcon, so their padding matches the status-icon column.
1 parent 5e1cecf commit 0cd5f85

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Basis/Packages/com.basis.framework/BasisUI/Menus/Library/LibraryProvider.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,6 +1955,8 @@ private static void CreateListEntry(BasisRuntimeSpawnRegistry.SpawnInstance item
19551955
selectItem.Descriptor.SetTitle(string.Empty);
19561956
selectItem.SetIcon(AddressableAssets.Sprites.Select);
19571957
selectItem.SetSize(new Vector2(80, 80));
1958+
// Inset the icon so its strokes stay clear of the bevel — matches PE Image Simple Square's pattern.
1959+
selectItem.Descriptor.IconImage.rectTransform.sizeDelta = new Vector2(-30, -30);
19581960

19591961
selectItem.OnClicked += async () =>
19601962
{
@@ -1979,6 +1981,7 @@ private static void CreateListEntry(BasisRuntimeSpawnRegistry.SpawnInstance item
19791981
TeleportToItem.Descriptor.SetTitle(string.Empty);
19801982
TeleportToItem.SetIcon(AddressableAssets.Sprites.TeleportTo);
19811983
TeleportToItem.SetSize(new Vector2(80, 80));
1984+
TeleportToItem.Descriptor.IconImage.rectTransform.sizeDelta = new Vector2(-30, -30);
19821985

19831986
TeleportToItem.OnClicked += () =>
19841987
{
@@ -2012,6 +2015,7 @@ private static void CreateListEntry(BasisRuntimeSpawnRegistry.SpawnInstance item
20122015
removeItem.Descriptor.SetTitle(string.Empty);
20132016
removeItem.SetIcon(AddressableAssets.Sprites.Trash);
20142017
removeItem.SetSize(new Vector2(80, 80));
2018+
removeItem.Descriptor.IconImage.rectTransform.sizeDelta = new Vector2(-30, -30);
20152019

20162020
// only apply this to items that are spawned on the network
20172021
if(itemKey.SpawnMethod == BasisRuntimeSpawnRegistry.SpawnMethod.Network)

0 commit comments

Comments
 (0)