mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-01 11:12:49 +08:00
Fix text clipping on inspector tab button
This commit is contained in:
@ -43,9 +43,10 @@ namespace UnityExplorer.Inspectors
|
|||||||
TabButton = UIFactory.CreateButton(UIRoot, "TabButton", "");
|
TabButton = UIFactory.CreateButton(UIRoot, "TabButton", "");
|
||||||
UIFactory.SetLayoutElement(TabButton.Component.gameObject, minWidth: 173, flexibleWidth: 0);
|
UIFactory.SetLayoutElement(TabButton.Component.gameObject, minWidth: 173, flexibleWidth: 0);
|
||||||
UIFactory.SetLayoutGroup<HorizontalLayoutGroup>(TabButton.Component.gameObject, false, false, true, true, 0, 0, 0, 3);
|
UIFactory.SetLayoutGroup<HorizontalLayoutGroup>(TabButton.Component.gameObject, false, false, true, true, 0, 0, 0, 3);
|
||||||
|
TabButton.GameObject.AddComponent<Mask>();
|
||||||
|
|
||||||
TabText = TabButton.Component.GetComponentInChildren<Text>();
|
TabText = TabButton.ButtonText;
|
||||||
UIFactory.SetLayoutElement(TabText.gameObject, minHeight: 25, minWidth: 173, flexibleWidth: 0);
|
UIFactory.SetLayoutElement(TabText.gameObject, minHeight: 25, minWidth: 150, flexibleWidth: 0);
|
||||||
TabText.alignment = TextAnchor.MiddleLeft;
|
TabText.alignment = TextAnchor.MiddleLeft;
|
||||||
TabText.fontSize = 12;
|
TabText.fontSize = 12;
|
||||||
TabText.horizontalOverflow = HorizontalWrapMode.Overflow;
|
TabText.horizontalOverflow = HorizontalWrapMode.Overflow;
|
||||||
|
Reference in New Issue
Block a user