From e2d4f9314a5097f961250b5e06b66660dc247312 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期二, 11 十一月 2025 17:05:03 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/HeroUI/HeroBestWin.cs |   34 +++++++++++++++++++++++++++++++---
 1 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/Main/System/HeroUI/HeroBestWin.cs b/Main/System/HeroUI/HeroBestWin.cs
index f6db6d3..ccf470b 100644
--- a/Main/System/HeroUI/HeroBestWin.cs
+++ b/Main/System/HeroUI/HeroBestWin.cs
@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using System.Linq;
+using Cysharp.Threading.Tasks;
 using UnityEngine;
 using UnityEngine.UI;
 
@@ -159,8 +160,31 @@
         RefreshFetter();
         RefreshGift();
         RefreshAwake();
+        ForceRefreshLayout();
     }
 
+
+
+    /// <summary>
+    /// 寮哄埗鍒锋柊Layout锛岃В鍐冲祵濂桳ayout鍜孋ontentSizeFitter鐨勯噸鍙犻棶棰�
+    /// </summary>
+    async UniTask ForceRefreshLayout()
+    {
+        await UniTask.DelayFrame(2);
+        // 鍒锋柊鎵�鏈塋ayout缁勪欢
+        var layouts = allAttrScroll.GetComponentsInChildren<LayoutGroup>(true);
+        foreach (var layout in layouts)
+        {
+            LayoutRebuilder.ForceRebuildLayoutImmediate(layout.GetComponent<RectTransform>());
+        }
+        await UniTask.DelayFrame(2);
+        // 鍒锋柊鎵�鏈塋ayout缁勪欢
+        foreach (var layout in layouts)
+        {
+            LayoutRebuilder.ForceRebuildLayoutImmediate(layout.GetComponent<RectTransform>());
+        }
+
+    }
 
 
     void RefreshConn()
@@ -255,8 +279,10 @@
             foldImg.SetActive(true);
             unfoldImg.SetActive(false);
             attrPanel.localPosition = foldPos.localPosition;
-            //绂佹attrScroll婊氬姩
-            allAttrScroll.enabled = false;
+            // //绂佹attrScroll婊氬姩
+            // allAttrScroll.enabled = false;
+            var _rect = allAttrScroll.GetComponent<RectTransform>();
+            _rect.sizeDelta = new Vector2(_rect.rect.width, 197);
 
         }
         else
@@ -264,7 +290,9 @@
             foldImg.SetActive(false);
             unfoldImg.SetActive(true);
             attrPanel.localPosition = unfoldPos.localPosition;
-            allAttrScroll.enabled = true;
+            // allAttrScroll.enabled = true;
+            var _rect = allAttrScroll.GetComponent<RectTransform>();
+            _rect.sizeDelta = new Vector2(_rect.rect.width, 933);
         }
     }
 

--
Gitblit v1.8.0