ui: keep the scroll viewport mask visible (alpha 0 clipped all content)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
66a8f6e903
commit
5486a9c033
1 file changed
+2
-1
@@ -197,7 +197,8 @@ namespace Decentralized
|
|||||||
if (scroll.viewport != null)
|
if (scroll.viewport != null)
|
||||||
{
|
{
|
||||||
var vpImg = scroll.viewport.GetComponent<Image>();
|
var vpImg = scroll.viewport.GetComponent<Image>();
|
||||||
if (vpImg != null) vpImg.color = Transparent;
|
// 视口的图是 Mask 的模板:alpha 为 0 会把整个内容裁掉,只能压到几乎看不见
|
||||||
|
if (vpImg != null) vpImg.color = new Color(0f, 0f, 0f, 0.004f);
|
||||||
}
|
}
|
||||||
if (scroll.verticalScrollbar != null)
|
if (scroll.verticalScrollbar != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user