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;