From 8107b88855d0aed3b6240205c1950f1f835469e7 Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Mon, 27 Nov 2017 16:57:22 -0500 Subject: [PATCH] Isolating the toggle image width for the toggle button --- .../Assets/Editor/GitHub.Unity/UI/TreeControl.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/TreeControl.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/TreeControl.cs index aed254212..ee5a42a36 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/TreeControl.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/TreeControl.cs @@ -448,8 +448,10 @@ public bool Render(Rect rect, float indentation, bool isSelected, GUIStyle folde if (IsFolder) { + var toggleRect = new Rect(nodeRect.x, nodeRect.y, style.border.horizontal, nodeRect.height); + EditorGUI.BeginChangeCheck(); - GUI.Toggle(nodeRect, !IsCollapsed, "", GUIStyle.none); + GUI.Toggle(toggleRect, !IsCollapsed, "", GUIStyle.none); changed = EditorGUI.EndChangeCheck(); }