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

Commit bafe346

Browse files
committed
Restyle the action bar
Move the action bar up top, move the account along with it, and make things wordwrapped.
1 parent 175aab9 commit bafe346

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Styles.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ public static GUIStyle HeaderBranchLabelStyle
226226
headerBranchLabelStyle = new GUIStyle(EditorStyles.label);
227227
headerBranchLabelStyle.name = "HeaderBranchLabelStyle";
228228
headerBranchLabelStyle.margin = new RectOffset(0, 0, 0, 0);
229+
headerBranchLabelStyle.wordWrap = true;
229230
}
230231
return headerBranchLabelStyle;
231232
}
@@ -240,6 +241,7 @@ public static GUIStyle HeaderRepoLabelStyle
240241
headerRepoLabelStyle = new GUIStyle(EditorStyles.boldLabel);
241242
headerRepoLabelStyle.name = "HeaderRepoLabelStyle";
242243
headerRepoLabelStyle.margin = new RectOffset(0, 0, 0, 0);
244+
headerRepoLabelStyle.wordWrap = true;
243245
}
244246
return headerRepoLabelStyle;
245247
}

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,12 @@ public override void OnUI()
219219

220220
if (HasRepository)
221221
{
222+
DoActionbarGUI();
223+
GUILayout.BeginVertical(Styles.HeaderBoxStyle);
222224
DoHeaderGUI();
225+
GUILayout.EndVertical();
223226
}
224227

225-
DoActionbarGUI();
226228
DoToolbarGUI();
227229

228230
var rect = GUILayoutUtility.GetLastRect();
@@ -434,7 +436,7 @@ private void DetachHandlers(IRepository repository)
434436

435437
private void DoHeaderGUI()
436438
{
437-
GUILayout.BeginHorizontal(Styles.HeaderBoxStyle);
439+
GUILayout.BeginHorizontal();
438440
{
439441
GUILayout.Space(3);
440442
GUILayout.BeginVertical(GUILayout.Width(16));
@@ -483,9 +485,6 @@ private void DoToolbarGUI()
483485
}
484486

485487
GUILayout.FlexibleSpace();
486-
487-
if (GUILayout.Button("Account", EditorStyles.toolbarDropDown))
488-
DoAccountDropdown();
489488
}
490489
EditorGUILayout.EndHorizontal();
491490
}
@@ -494,8 +493,6 @@ private void DoActionbarGUI()
494493
{
495494
GUILayout.BeginHorizontal(EditorStyles.toolbar);
496495
{
497-
GUILayout.FlexibleSpace();
498-
499496
if (hasRemote)
500497
{
501498
EditorGUI.BeginDisabledGroup(currentRemoteName == null);
@@ -550,6 +547,11 @@ private void DoActionbarGUI()
550547
PopupWindow.OpenWindow(PopupWindow.PopupViewType.PublishView);
551548
}
552549
}
550+
551+
GUILayout.FlexibleSpace();
552+
553+
if (GUILayout.Button("Account", EditorStyles.toolbarDropDown))
554+
DoAccountDropdown();
553555
}
554556
EditorGUILayout.EndHorizontal();
555557
}

0 commit comments

Comments
 (0)