Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 4105c91

Browse files
Merge branch 'branches-view' into fixes/branches-view-cleanup
2 parents 73d841e + 87c63f0 commit 4105c91

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/TreeControl.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ namespace GitHub.Unity
1111
[Serializable]
1212
public class Tree
1313
{
14-
[SerializeField] public float ItemHeight = EditorGUIUtility.singleLineHeight;
15-
[SerializeField] public float ItemSpacing = EditorGUIUtility.standardVerticalSpacing;
16-
[SerializeField] public float Indentation = 12f;
14+
public static float ItemHeight { get { return EditorGUIUtility.singleLineHeight; } }
15+
public static float ItemSpacing { get { return EditorGUIUtility.standardVerticalSpacing; } }
16+
1717
[SerializeField] public Rect Margin = new Rect();
1818
[SerializeField] public Rect Padding = new Rect();
1919

@@ -169,7 +169,7 @@ public Rect Render(Rect rect, Vector2 scroll, Action<TreeNode> singleClick = nul
169169

170170
if (visible)
171171
{
172-
var changed = node.Render(rect, Indentation, selectedNode == node, FolderStyle, TreeNodeStyle, ActiveTreeNodeStyle);
172+
var changed = node.Render(rect, Styles.TreeIndentation, selectedNode == node, FolderStyle, TreeNodeStyle, ActiveTreeNodeStyle);
173173

174174
if (node.IsFolder && changed)
175175
{
@@ -437,7 +437,7 @@ public bool Render(Rect rect, float indentation, bool isSelected, GUIStyle folde
437437

438438
if (Event.current.type == EventType.repaint)
439439
{
440-
nodeStyle.Draw(fillRect, "", false, false, false, isSelected);
440+
nodeStyle.Draw(fillRect, GUIContent.none, false, false, false, isSelected);
441441
if (IsFolder)
442442
{
443443
style.Draw(nodeRect, content, false, false, !IsCollapsed, isSelected);
@@ -451,7 +451,7 @@ public bool Render(Rect rect, float indentation, bool isSelected, GUIStyle folde
451451
if (IsFolder)
452452
{
453453
EditorGUI.BeginChangeCheck();
454-
GUI.Toggle(nodeRect, !IsCollapsed, "", GUIStyle.none);
454+
GUI.Toggle(nodeRect, !IsCollapsed, GUIContent.none, GUIStyle.none);
455455
changed = EditorGUI.EndChangeCheck();
456456
}
457457

0 commit comments

Comments
 (0)