@@ -20,7 +20,7 @@ class PublishView : Subview
20
20
private const string SelectedOwnerLabel = "Owner" ;
21
21
private const string RepositoryNameLabel = "Repository Name" ;
22
22
private const string DescriptionLabel = "Description" ;
23
- private const string CreatePrivateRepositoryLabel = "Create as a private repository " ;
23
+ private const string CreatePrivateRepositoryLabel = "Make repository private" ;
24
24
private const string PublishLimtPrivateRepositoriesError = "You are currently at your limt of private repositories" ;
25
25
private const string AuthenticationChangedMessageFormat = "You were authenticated as \" {0}\" , but you are now authenticated as \" {1}\" . Would you like to proceed or logout?" ;
26
26
private const string AuthenticationChangedTitle = "Authentication Changed" ;
@@ -157,76 +157,18 @@ private void LoadOwners()
157
157
158
158
public override void OnGUI ( )
159
159
{
160
- GUILayout . BeginHorizontal ( Styles . AuthHeaderBoxStyle ) ;
161
- {
162
- GUILayout . BeginVertical ( GUILayout . Width ( 16 ) ) ;
163
- {
164
- GUILayout . Space ( 9 ) ;
165
- GUILayout . Label ( Styles . BigLogo , GUILayout . Height ( 20 ) , GUILayout . Width ( 20 ) ) ;
166
- }
167
- GUILayout . EndVertical ( ) ;
168
-
169
- GUILayout . BeginVertical ( ) ;
170
- {
171
- GUILayout . Space ( 11 ) ;
172
- GUILayout . Label ( Title , EditorStyles . boldLabel ) ;
173
- }
174
- GUILayout . EndVertical ( ) ;
175
- }
176
- GUILayout . EndHorizontal ( ) ;
177
-
178
- GUILayout . Space ( Styles . PublishViewSpacingHeight ) ;
160
+ GUILayout . Label ( "Publish to GitHub" , EditorStyles . boldLabel ) ;
179
161
180
162
EditorGUI . BeginDisabledGroup ( isBusy ) ;
181
163
{
182
- GUILayout . BeginHorizontal ( ) ;
183
- {
184
- GUILayout . BeginVertical ( ) ;
185
- {
186
- GUILayout . Label ( SelectedOwnerLabel ) ;
187
- selectedOwner = EditorGUILayout . Popup ( selectedOwner , owners ) ;
188
- }
189
- GUILayout . EndVertical ( ) ;
190
-
191
- GUILayout . BeginVertical ( GUILayout . Width ( 8 ) ) ;
192
- {
193
- GUILayout . Space ( 20 ) ;
194
- GUILayout . Label ( "/" ) ;
195
- }
196
- GUILayout . EndVertical ( ) ;
197
-
198
- GUILayout . BeginVertical ( ) ;
199
- {
200
- GUILayout . Label ( RepositoryNameLabel ) ;
201
- repoName = EditorGUILayout . TextField ( repoName ) ;
202
- }
203
- GUILayout . EndVertical ( ) ;
204
- }
205
- GUILayout . EndHorizontal ( ) ;
206
-
207
- GUILayout . Label ( DescriptionLabel ) ;
208
- repoDescription = EditorGUILayout . TextField ( repoDescription ) ;
209
- GUILayout . Space ( Styles . PublishViewSpacingHeight ) ;
164
+ selectedOwner = EditorGUILayout . Popup ( SelectedOwnerLabel , selectedOwner , owners ) ;
165
+ repoName = EditorGUILayout . TextField ( RepositoryNameLabel , repoName ) ;
166
+ repoDescription = EditorGUILayout . TextField ( DescriptionLabel , repoDescription ) ;
210
167
211
- GUILayout . BeginVertical ( ) ;
212
- {
213
- GUILayout . BeginHorizontal ( ) ;
214
- {
215
- togglePrivate = GUILayout . Toggle ( togglePrivate , CreatePrivateRepositoryLabel ) ;
216
- }
217
- GUILayout . EndHorizontal ( ) ;
218
-
219
- GUILayout . BeginHorizontal ( ) ;
220
- {
221
- GUILayout . Space ( Styles . PublishViewSpacingHeight ) ;
222
- var repoPrivacyExplanation = togglePrivate ? PrivateRepoMessage : PublicRepoMessage ;
223
- GUILayout . Label ( repoPrivacyExplanation , Styles . LongMessageStyle ) ;
224
- }
225
- GUILayout . EndHorizontal ( ) ;
226
- }
227
- GUILayout . EndVertical ( ) ;
168
+ togglePrivate = EditorGUILayout . Toggle ( CreatePrivateRepositoryLabel , togglePrivate ) ;
228
169
229
- GUILayout . Space ( Styles . PublishViewSpacingHeight ) ;
170
+ var repoPrivacyExplanation = togglePrivate ? PrivateRepoMessage : PublicRepoMessage ;
171
+ EditorGUILayout . HelpBox ( repoPrivacyExplanation , MessageType . None ) ;
230
172
231
173
GUILayout . BeginHorizontal ( ) ;
232
174
{
@@ -278,7 +220,7 @@ public override void OnGUI()
278
220
GUILayout . Space ( 10 ) ;
279
221
280
222
if ( error != null )
281
- GUILayout . Label ( error , Styles . ErrorLabel ) ;
223
+ EditorGUILayout . HelpBox ( error , MessageType . Error ) ;
282
224
283
225
GUILayout . FlexibleSpace ( ) ;
284
226
}
0 commit comments