From 2631590df6db811bbea6cdda56bd587cc4293a88 Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:33:15 -0700 Subject: [PATCH] adjust out of stock sizing --- Patches/FilterOutOfStockPatches.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Patches/FilterOutOfStockPatches.cs b/Patches/FilterOutOfStockPatches.cs index 6d18910..f48ee40 100644 --- a/Patches/FilterOutOfStockPatches.cs +++ b/Patches/FilterOutOfStockPatches.cs @@ -50,15 +50,16 @@ public static class FilterOutOfStockPatches HorizontalLayoutGroup layoutGroup = OutOfStockPanel.AddComponent(); layoutGroup.childForceExpandHeight = layoutGroup.childForceExpandWidth = false; - layoutGroup.childControlHeight = layoutGroup.childControlWidth = false; + layoutGroup.childControlHeight = false; + layoutGroup.childControlWidth = true; layoutGroup.childAlignment = TextAnchor.MiddleRight; Image checkbox = UnityEngine.Object.Instantiate(__instance.transform.Find("TradeControll/Tabs/FillButton/Default/Icon_Box").GetComponent(), OutOfStockPanel.transform, false); - checkbox.SetNativeSize(); + checkbox.RectTransform().sizeDelta = new Vector2(20f, 20f); + checkbox.preserveAspect = true; Image check = UnityEngine.Object.Instantiate(__instance.transform.Find("TradeControll/Tabs/FillButton/Checkmark").GetComponent(), checkbox.transform, false); - check.SetNativeSize(); - check.RectTransform().anchoredPosition = Vector2.zero; - check.transform.localScale = new Vector3(.7f, .7f, .7f); + check.RectTransform().anchoredPosition = new Vector2(-2f, 0f); + check.RectTransform().sizeDelta = new Vector2(13f, 12f); check.gameObject.SetActive(ShowOutOfStockItems); LocalizedText text = UnityEngine.Object.Instantiate(____updateAssort.transform.Find("TextWhite").GetComponent(), OutOfStockPanel.transform, false); @@ -67,7 +68,7 @@ public static class FilterOutOfStockPatches TextMeshProUGUI textMesh = text.GetComponent(); textMesh.enableAutoSizing = false; - textMesh.fontSize = 18f; + textMesh.fontSize = 14f; Image background = OutOfStockPanel.AddComponent(); background.color = Color.clear;