From 647b0d353d1940e914eee83ee76d320cdeffdd15 Mon Sep 17 00:00:00 2001 From: Sinai <49360850+sinai-dev@users.noreply.github.com> Date: Sat, 12 Mar 2022 20:17:03 +1100 Subject: [PATCH] Fix text clipping on inspector tab button --- src/Inspectors/InspectorTab.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Inspectors/InspectorTab.cs b/src/Inspectors/InspectorTab.cs index 350c1eb..fb5b965 100644 --- a/src/Inspectors/InspectorTab.cs +++ b/src/Inspectors/InspectorTab.cs @@ -43,9 +43,10 @@ namespace UnityExplorer.Inspectors TabButton = UIFactory.CreateButton(UIRoot, "TabButton", ""); UIFactory.SetLayoutElement(TabButton.Component.gameObject, minWidth: 173, flexibleWidth: 0); UIFactory.SetLayoutGroup(TabButton.Component.gameObject, false, false, true, true, 0, 0, 0, 3); + TabButton.GameObject.AddComponent(); - TabText = TabButton.Component.GetComponentInChildren(); - UIFactory.SetLayoutElement(TabText.gameObject, minHeight: 25, minWidth: 173, flexibleWidth: 0); + TabText = TabButton.ButtonText; + UIFactory.SetLayoutElement(TabText.gameObject, minHeight: 25, minWidth: 150, flexibleWidth: 0); TabText.alignment = TextAnchor.MiddleLeft; TabText.fontSize = 12; TabText.horizontalOverflow = HorizontalWrapMode.Overflow;